Package org.apache.pekko.actor.typed
Class Behavior$
java.lang.Object
org.apache.pekko.actor.typed.Behavior$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <Inner> Behavior.BehaviorDecorators<Inner>BehaviorDecorators(Behavior<Inner> behavior) <T> Behavior<T>canonicalize(Behavior<T> behavior, Behavior<T> current, TypedActorContext<T> ctx) Given a possibly special behavior (same or unhandled) and a “current” behavior (which defines the meaning of encountering asamebehavior) this method computes the next behavior, suitable for passing a message or signal.<T> booleanexistsInStack(Behavior<T> behavior, scala.Function1<Behavior<T>, Object> p) Go through the behavior stack and apply a predicate to see if any nested behavior satisfies it.<T> Behavior<T>interpretMessage(Behavior<T> behavior, TypedActorContext<T> ctx, T msg) Execute the behavior with the given message.<T> Behavior<T>interpretSignal(Behavior<T> behavior, TypedActorContext<T> ctx, Signal signal) Execute the behavior with the given signal.<T> booleanReturns true if the given behavior is not stopped.<T> booleanisDeferred(Behavior<T> behavior) Returns true if the given behavior is deferred.<T> booleanisUnhandled(Behavior<T> behavior) Returns true if the given behavior is the specialunhandledmarker.<T> Behavior<T>start(Behavior<T> behavior, TypedActorContext<T> ctx) Starts deferred behavior and nested deferred behaviors until all deferred behaviors in the stack are started and then the resulting behavior is returned.<T> Behavior<T>validateAsInitial(Behavior<T> behavior) Validate the given behavior as a suitable initial actor behavior; most notably the behavior can neither besamenorunhandled.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Behavior$
public Behavior$()
-
-
Method Details
-
BehaviorDecorators
public final <Inner> Behavior.BehaviorDecorators<Inner> BehaviorDecorators(Behavior<Inner> behavior) -
canonicalize
public <T> Behavior<T> canonicalize(Behavior<T> behavior, Behavior<T> current, TypedActorContext<T> ctx) Given a possibly special behavior (same or unhandled) and a “current” behavior (which defines the meaning of encountering asamebehavior) this method computes the next behavior, suitable for passing a message or signal. -
start
Starts deferred behavior and nested deferred behaviors until all deferred behaviors in the stack are started and then the resulting behavior is returned. -
existsInStack
Go through the behavior stack and apply a predicate to see if any nested behavior satisfies it. The stack must not contain any unstarted deferred behavior or anIllegalArgumentExceptionwill be thrown. -
validateAsInitial
Validate the given behavior as a suitable initial actor behavior; most notably the behavior can neither besamenorunhandled. Starting out with aStoppedbehavior is allowed, though. -
isAlive
Returns true if the given behavior is not stopped. -
isUnhandled
Returns true if the given behavior is the specialunhandledmarker. -
isDeferred
Returns true if the given behavior is deferred. -
interpretMessage
Execute the behavior with the given message. -
interpretSignal
public <T> Behavior<T> interpretSignal(Behavior<T> behavior, TypedActorContext<T> ctx, Signal signal) Execute the behavior with the given signal.
-