Package org.apache.pekko.actor.typed
Class SuperviseBehavior<T>
java.lang.Object
org.apache.pekko.actor.typed.Behavior<T>
org.apache.pekko.actor.typed.SuperviseBehavior<T>
INTERNAL API
A behavior type that could be supervised, Not for user extension.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pekko.actor.typed.Behavior
Behavior.BehaviorDecorators<Inner>, Behavior.BehaviorDecorators$ -
Method Summary
Modifier and TypeMethodDescription<Thr extends Throwable>
SuperviseBehavior<T>onFailure(Class<Thr> clazz, SupervisorStrategy strategy) Specify theSupervisorStrategyto be invoked when the wrapped behavior throws.<Thr extends Throwable>
SuperviseBehavior<T>onFailure(SupervisorStrategy strategy, scala.reflect.ClassTag<Thr> tag) Specify theSupervisorStrategyto be invoked when the wrapped behavior throws.<Thr extends Throwable>
scala.reflect.ClassTag<scala.runtime.Nothing$>onFailure$default$2(SupervisorStrategy strategy) wrapped()Methods inherited from class org.apache.pekko.actor.typed.Behavior
BehaviorDecorators, canonicalize, existsInStack, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, start, validateAsInitial
-
Method Details
-
onFailure
public <Thr extends Throwable> SuperviseBehavior<T> onFailure(SupervisorStrategy strategy, scala.reflect.ClassTag<Thr> tag) Specify theSupervisorStrategyto be invoked when the wrapped behavior throws. -
onFailure
public <Thr extends Throwable> SuperviseBehavior<T> onFailure(Class<Thr> clazz, SupervisorStrategy strategy) Specify theSupervisorStrategyto be invoked when the wrapped behavior throws.Only exceptions of the given type (and their subclasses) will be handled by this supervision behavior.
-
onFailure$default$2
public <Thr extends Throwable> scala.reflect.ClassTag<scala.runtime.Nothing$> onFailure$default$2(SupervisorStrategy strategy) -
wrapped
-