public static final class ScalaDSL.Widened<T,U> extends Behavior<U> implements scala.Product, scala.Serializable
Behavior.emptyBehavior$, Behavior.ignoreBehavior$, Behavior.sameBehavior$, Behavior.stoppedBehavior$, Behavior.unhandledBehavior$
Constructor and Description |
---|
Widened(Behavior<T> behavior,
scala.PartialFunction<U,T> matcher) |
Modifier and Type | Method and Description |
---|---|
Behavior<T> |
behavior() |
Behavior<U> |
management(ActorContext<U> ctx,
Signal msg)
Process an incoming
Signal and return the next behavior. |
scala.PartialFunction<U,T> |
matcher() |
Behavior<U> |
message(ActorContext<U> ctx,
U msg)
Process an incoming message and return the next behavior.
|
java.lang.String |
toString() |
canonicalize, isAlive, isUnhandled, narrow, preStart, validateAsInitial
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Behavior<U> management(ActorContext<U> ctx, Signal msg)
Behavior
Signal
and return the next behavior. This means
that all lifecycle hooks, ReceiveTimeout, Terminated and Failed messages
can initiate a behavior change.
The returned behavior can in addition to normal behaviors be one of the canned special objects:
* returning Stopped
will terminate this Behavior
* returning Same
designates to reuse the current Behavior
* returning Unhandled
keeps the same Behavior and signals that the message was not yet handled
Code calling this method should use Behavior$
canonicalize
to replace
the special objects with real Behaviors.
management
in class Behavior<U>
ctx
- (undocumented)msg
- (undocumented)public Behavior<U> message(ActorContext<U> ctx, U msg)
Behavior
The returned behavior can in addition to normal behaviors be one of the canned special objects:
* returning Stopped
will terminate this Behavior
* returning Same
designates to reuse the current Behavior
* returning Unhandled
keeps the same Behavior and signals that the message was not yet handled
Code calling this method should use Behavior$
canonicalize
to replace
the special objects with real Behaviors.
public java.lang.String toString()
toString
in class java.lang.Object