Class InterceptorImpl<O,I>
- java.lang.Object
-
- akka.actor.typed.Behavior<T>
-
- akka.actor.typed.ExtensibleBehavior<O>
-
- akka.actor.typed.internal.InterceptorImpl<O,I>
-
public final class InterceptorImpl<O,I> extends ExtensibleBehavior<O>
Provides the impl of any behavior that could nest another behaviorINTERNAL API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.actor.typed.Behavior
Behavior.BehaviorDecorators<Inner>, Behavior.BehaviorDecorators$
-
-
Constructor Summary
Constructors Constructor Description InterceptorImpl(BehaviorInterceptor<O,I> interceptor, Behavior<I> nestedBehavior)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <O,I>
Behavior<O>apply(scala.Function0<BehaviorInterceptor<O,I>> interceptor, Behavior<I> nestedBehavior)
BehaviorInterceptor<O,I>
interceptor()
Behavior<I>
nestedBehavior()
Behavior<O>
preStart(TypedActorContext<O> ctx)
Behavior<O>
receive(TypedActorContext<O> ctx, O msg)
Process an incoming message and return the next behavior.Behavior<O>
receiveSignal(TypedActorContext<O> ctx, Signal signal)
Process an incomingSignal
and return the next behavior.Behavior<O>
replaceNested(Behavior<I> newNested)
java.lang.String
toString()
-
Methods inherited from class akka.actor.typed.Behavior
_tag, BehaviorDecorators, canonicalize, existsInStack, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, start, unsafeCast, validateAsInitial
-
-
-
-
Constructor Detail
-
InterceptorImpl
public InterceptorImpl(BehaviorInterceptor<O,I> interceptor, Behavior<I> nestedBehavior)
-
-
Method Detail
-
apply
public static <O,I> Behavior<O> apply(scala.Function0<BehaviorInterceptor<O,I>> interceptor, Behavior<I> nestedBehavior)
-
interceptor
public BehaviorInterceptor<O,I> interceptor()
-
preStart
public Behavior<O> preStart(TypedActorContext<O> ctx)
-
receive
public Behavior<O> receive(TypedActorContext<O> ctx, O msg)
Description copied from class:ExtensibleBehavior
Process an incoming message and return the next behavior.The returned behavior can in addition to normal behaviors be one of the canned special objects:
* returning
stopped
will terminate this Behavior * returningsame
designates to reuse the current Behavior * returningunhandled
keeps the same Behavior and signals that the message was not yet handledCode calling this method should use
Behavior$
canonicalize
to replace the special objects with real Behaviors.- Specified by:
receive
in classExtensibleBehavior<O>
-
receiveSignal
public Behavior<O> receiveSignal(TypedActorContext<O> ctx, Signal signal)
Description copied from class:ExtensibleBehavior
Process an incomingSignal
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 * returningsame
designates to reuse the current Behavior * returningunhandled
keeps the same Behavior and signals that the message was not yet handledCode calling this method should use
Behavior$
canonicalize
to replace the special objects with real Behaviors.- Specified by:
receiveSignal
in classExtensibleBehavior<O>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-