Packages

object BehaviorBuilder

Source
BehaviorBuilder.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BehaviorBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def create[T]: BehaviorBuilder[T]
  2. def message[T, M <: T](type: Class[M], test: Predicate[M], handler: Function2[ActorContext[T], M, Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with this predicated case.

    Start a new behavior chain starting with this predicated case.

    T

    type of behavior to create

    M

    type of message to match

    type

    type of message to match

    test

    a predicate that will be evaluated on the argument if the type matches

    handler

    action to apply if the type matches and the predicate returns true

    returns

    a new behavior with the specified handling appended

  3. def message[T, M <: T](type: Class[M], handler: Function2[ActorContext[T], M, Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with this case.

    Start a new behavior chain starting with this case.

    T

    type of behavior to create

    M

    type of message to match

    type

    type of message to match

    handler

    action to apply if the type matches

    returns

    a new behavior with the specified handling appended

  4. def messageEquals[T](msg: T, handler: Function[ActorContext[T], Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with a handler for equal messages.

    Start a new behavior chain starting with a handler for equal messages.

    T

    type of behavior to create

    msg

    the message to compare to

    handler

    action to apply when the message matches

    returns

    a new behavior with the specified handling appended

  5. def messageUnchecked[T, M <: T](type: Class[_ <: T], handler: Function2[ActorContext[T], M, Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with a handler without compile time type check.

    Start a new behavior chain starting with a handler without compile time type check.

    Should normally not be used, but when matching on class with generic type argument it can be useful, e.g. List.class and (List<String> list) -> {...}

    type

    type of message to match

    handler

    action to apply when the type matches

    returns

    a new behavior with the specified handling appended

  6. def signal[T, M <: Signal](type: Class[M], test: Predicate[M], handler: Function2[ActorContext[T], M, Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with this predicated signal case.

    Start a new behavior chain starting with this predicated signal case.

    T

    type of behavior to create

    M

    type of signal to match

    type

    type of signals to match

    test

    a predicate that will be evaluated on the argument if the type matches

    handler

    action to apply if the type matches and the predicate returns true

    returns

    a new behavior with the specified handling appended

  7. def signal[T, M <: Signal](type: Class[M], handler: Function2[ActorContext[T], M, Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with this signal case.

    Start a new behavior chain starting with this signal case.

    T

    type of behavior to create

    M

    type of signal to match

    type

    type of signal to match

    handler

    action to apply if the type matches

    returns

    a new behavior with the specified handling appended

  8. def signalEquals[T](signal: Signal, handler: Function[ActorContext[T], Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with a handler for this specific signal.

    Start a new behavior chain starting with a handler for this specific signal.

    T

    type of behavior to create

    signal

    the signal to compare to

    handler

    action to apply when the message matches

    returns

    a new behavior with the specified handling appended

  9. def signalUnchecked[T, M <: Signal](type: Class[_ <: Signal], handler: Function2[ActorContext[T], M, Behavior[T]]): BehaviorBuilder[T]

    Start a new behavior chain starting with this unchecked signal case.

    Start a new behavior chain starting with this unchecked signal case.

    Should normally not be used, but when matching on class with generic type argument it can be useful, e.g. GenMsg.class and (ActorContext ctx, GenMsg<String> list) -> {...}

    type

    type of signal to match

    handler

    action to apply when the type matches

    returns

    a new behavior with the specified handling appended