Class AbstractSupervisor<I,Thr extends Throwable>
java.lang.Object
org.apache.pekko.actor.typed.BehaviorInterceptor<Object,I>
org.apache.pekko.actor.typed.internal.AbstractSupervisor<I,Thr>
- Direct Known Subclasses:
RestartSupervisor,SimpleSupervisor
public abstract class AbstractSupervisor<I,Thr extends Throwable>
extends BehaviorInterceptor<Object,I>
INTERNAL API
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pekko.actor.typed.BehaviorInterceptor
BehaviorInterceptor.PreStartTarget<T>, BehaviorInterceptor.ReceiveTarget<T>, BehaviorInterceptor.SignalTarget<T> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSupervisor(SupervisorStrategy strategy, scala.reflect.ClassTag<Thr> ev) -
Method Summary
Modifier and TypeMethodDescriptionaroundSignal(TypedActorContext<Object> ctx, Signal signal, BehaviorInterceptor.SignalTarget<I> target) Override to intercept a signal sent to the running actor.aroundStart(TypedActorContext<Object> ctx, BehaviorInterceptor.PreStartTarget<I> target) Override to intercept actor startup.voiddropped(TypedActorContext<?> ctx, Object signalOrMessage) protected booleanbooleanisSame(BehaviorInterceptor<Object, Object> other) voidlog(TypedActorContext<?> ctx, Throwable t) voidlog(TypedActorContext<?> ctx, Throwable t, int errorCount) toString()Methods inherited from class org.apache.pekko.actor.typed.BehaviorInterceptor
aroundReceive, interceptMessageClass
-
Constructor Details
-
AbstractSupervisor
-
-
Method Details
-
aroundSignal
public Behavior<I> aroundSignal(TypedActorContext<Object> ctx, Signal signal, BehaviorInterceptor.SignalTarget<I> target) Description copied from class:BehaviorInterceptorOverride to intercept a signal sent to the running actor. Pass the signal on to the next behavior in the stack by passing it totarget.apply.- Overrides:
aroundSignalin classBehaviorInterceptor<Object,I> - Returns:
- The behavior for next message or signal
- See Also:
-
aroundStart
public Behavior<I> aroundStart(TypedActorContext<Object> ctx, BehaviorInterceptor.PreStartTarget<I> target) Description copied from class:BehaviorInterceptorOverride to intercept actor startup. To trigger startup of the next behavior in the stack, calltarget.start().- Overrides:
aroundStartin classBehaviorInterceptor<Object,I> - Returns:
- The returned behavior will be the "started" behavior of the actor used to accept the next message or signal.
-
dropped
-
handleExceptionOnStart
protected abstract scala.PartialFunction<Throwable,Behavior<I>> handleExceptionOnStart(TypedActorContext<Object> ctx, BehaviorInterceptor.PreStartTarget<I> target) -
handleReceiveException
protected abstract scala.PartialFunction<Throwable,Behavior<I>> handleReceiveException(TypedActorContext<Object> ctx, BehaviorInterceptor.ReceiveTarget<I> target) -
handleSignalException
protected abstract scala.PartialFunction<Throwable,Behavior<I>> handleSignalException(TypedActorContext<Object> ctx, BehaviorInterceptor.SignalTarget<I> target) -
isInstanceOfTheThrowableClass
-
isSame
- Overrides:
isSamein classBehaviorInterceptor<Object,I> - Returns:
trueif this behavior logically the same as another behavior interceptor and can therefore be eliminated (to avoid building infinitely growing stacks of behaviors)? Default implementation is based on instance equality. Override to provide use case specific logic.
-
log
-
log
-
toString
-