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>
-
public class SuperviseBehavior<T> extends Behavior<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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <Thr extends java.lang.Throwable>
SuperviseBehavior<T>onFailure(java.lang.Class<Thr> clazz, SupervisorStrategy strategy)
Specify theSupervisorStrategy
to be invoked when the wrapped behavior throws.<Thr extends java.lang.Throwable>
SuperviseBehavior<T>onFailure(SupervisorStrategy strategy, scala.reflect.ClassTag<Thr> tag)
Specify theSupervisorStrategy
to be invoked when the wrapped behavior throws.<Thr extends java.lang.Throwable>
scala.reflect.ClassTag<scala.runtime.Nothing$>onFailure$default$2(SupervisorStrategy strategy)
Behavior<T>
wrapped()
-
Methods inherited from class org.apache.pekko.actor.typed.Behavior
BehaviorDecorators, canonicalize, existsInStack, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, start, validateAsInitial
-
-
-
-
Method Detail
-
onFailure
public <Thr extends java.lang.Throwable> SuperviseBehavior<T> onFailure(SupervisorStrategy strategy, scala.reflect.ClassTag<Thr> tag)
Specify theSupervisorStrategy
to be invoked when the wrapped behavior throws.
-
onFailure
public <Thr extends java.lang.Throwable> SuperviseBehavior<T> onFailure(java.lang.Class<Thr> clazz, SupervisorStrategy strategy)
Specify theSupervisorStrategy
to 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 java.lang.Throwable> scala.reflect.ClassTag<scala.runtime.Nothing$> onFailure$default$2(SupervisorStrategy strategy)
-
-