Package akka.actor.typed.internal
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<T>, Behavior.BehaviorDecorators$, Behavior.DeferredBehavior<T>, Behavior.DeferredBehavior$, Behavior.EmptyBehavior$, Behavior.FailedBehavior, Behavior.IgnoreBehavior$, Behavior.SameBehavior$, Behavior.StoppedBehavior<T>, Behavior.StoppedBehavior$, Behavior.UnhandledBehavior$
-
-
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(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)
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, empty, existsInStack, failed, ignore, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, orElse, same, start, stopped, stopped, unhandled, unhandledSignal, unsafeCast, validateAsInitial
-
-
-
-
Constructor Detail
-
InterceptorImpl
public InterceptorImpl(BehaviorInterceptor<O,I> interceptor, Behavior<I> nestedBehavior)
-
-
Method Detail
-
apply
public static <O,I> Behavior<O> apply(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)
- 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>
- Parameters:
ctx
- (undocumented)signal
- (undocumented)- Returns:
- (undocumented)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-