Package akka.testkit
Class TestActor.DelegatingSupervisorStrategy
- java.lang.Object
-
- akka.actor.SupervisorStrategy
-
- akka.testkit.TestActor.DelegatingSupervisorStrategy
-
- Enclosing class:
- TestActor
public static class TestActor.DelegatingSupervisorStrategy extends SupervisorStrategy
INTERNAL API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.actor.SupervisorStrategy
SupervisorStrategy.Directive, SupervisorStrategy.Escalate$, SupervisorStrategy.Restart$, SupervisorStrategy.Resume$, SupervisorStrategy.Stop$
-
-
Constructor Summary
Constructors Constructor Description DelegatingSupervisorStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive>decider()voidhandleChildTerminated(ActorContext context, ActorRef child, scala.collection.Iterable<ActorRef> children)This method is called after the child has been removed from the set of children.booleanhandleFailure(ActorContext context, ActorRef child, java.lang.Throwable cause, ChildRestartStats stats, scala.collection.Iterable<ChildRestartStats> children)This is the main entry point: in case of a child’s failure, this method must try to handle the failure by resuming, restarting or stopping the child (and returningtrue), or it returnsfalseto escalate the failure, which will lead to this actor re-throwing the exception which caused the failure.voidprocessFailure(ActorContext context, boolean restart, ActorRef child, java.lang.Throwable cause, ChildRestartStats stats, scala.collection.Iterable<ChildRestartStats> children)This method is called to act on the failure of a child: restart if the flag is true, stop otherwise.voidupdate(ActorRef child, SupervisorStrategy supervisor)-
Methods inherited from class akka.actor.SupervisorStrategy
defaultDecider, defaultStrategy, escalate, escalateDefault, logFailure, loggingEnabled, makeDecider, makeDecider, makeDecider, makeDecider, maxNrOfRetriesOption, restart, restartChild, resume, resumeChild, seqCauseDirective2Decider, seqThrowable2Decider, sort, stop, stoppingStrategy, withinTimeRangeOption
-
-
-
-
Method Detail
-
decider
public scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider()
- Specified by:
deciderin classSupervisorStrategy
-
handleChildTerminated
public void handleChildTerminated(ActorContext context, ActorRef child, scala.collection.Iterable<ActorRef> children)
Description copied from class:SupervisorStrategyThis method is called after the child has been removed from the set of children. It does not need to do anything special. Exceptions thrown from this method do NOT make the actor fail if this happens during termination.- Specified by:
handleChildTerminatedin classSupervisorStrategy- Parameters:
context- (undocumented)child- (undocumented)children- (undocumented)
-
handleFailure
public boolean handleFailure(ActorContext context, ActorRef child, java.lang.Throwable cause, ChildRestartStats stats, scala.collection.Iterable<ChildRestartStats> children)
Description copied from class:SupervisorStrategyThis is the main entry point: in case of a child’s failure, this method must try to handle the failure by resuming, restarting or stopping the child (and returningtrue), or it returnsfalseto escalate the failure, which will lead to this actor re-throwing the exception which caused the failure. The exception will not be wrapped.This method calls
SupervisorStrategy.logFailure(akka.actor.ActorContext, akka.actor.ActorRef, java.lang.Throwable, akka.actor.SupervisorStrategy.Directive), which will log the failure unless it is escalated. You can customize the logging by settingSupervisorStrategy.loggingEnabled()tofalseand do the logging inside thedecideror override thelogFailuremethod.- Overrides:
handleFailurein classSupervisorStrategy- Parameters:
context- (undocumented)cause- (undocumented)stats- (undocumented)children- is a lazy collection (a view)- Returns:
- (undocumented)
-
processFailure
public void processFailure(ActorContext context, boolean restart, ActorRef child, java.lang.Throwable cause, ChildRestartStats stats, scala.collection.Iterable<ChildRestartStats> children)
Description copied from class:SupervisorStrategyThis method is called to act on the failure of a child: restart if the flag is true, stop otherwise.- Specified by:
processFailurein classSupervisorStrategy- Parameters:
context- (undocumented)restart- (undocumented)child- (undocumented)cause- (undocumented)stats- (undocumented)children- (undocumented)
-
update
public void update(ActorRef child, SupervisorStrategy supervisor)
-
-