Package akka.actor.dsl
Interface Creators.Act
-
- All Superinterfaces:
Actor
- All Known Subinterfaces:
Creators.ActWithStash
- Enclosing interface:
- Creators
public static interface Creators.Act extends Actor
- See Also:
OneForOneStrategy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AllForOneStrategy$
AllForOneStrategy()
void
become(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> r)
Replace the behavior at the top of the behavior stack for this actor.void
becomeStacked(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> r)
Add the given behavior on top of the behavior stack for this actor.SupervisorStrategy.Escalate$
Escalate()
OneForOneStrategy$
OneForOneStrategy()
void
postRestart(java.lang.Throwable cause)
User overridable callback: By default it callspreStart()
.void
postRestartFun_$eq(scala.Function1<java.lang.Throwable,scala.runtime.BoxedUnit> x$1)
void
postStop()
User overridable callback.void
postStopFun_$eq(scala.Function0<scala.runtime.BoxedUnit> x$1)
void
preRestart(java.lang.Throwable cause, scala.Option<java.lang.Object> msg)
Scala API: User overridable callback: '''By default it disposes of all children and then callspostStop()
.'''void
preRestartFun_$eq(scala.Function2<java.lang.Throwable,scala.Option<java.lang.Object>,scala.runtime.BoxedUnit> x$1)
void
preStart()
User overridable callback.void
preStartFun_$eq(scala.Function0<scala.runtime.BoxedUnit> x$1)
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receive()
Default behavior of the actor is empty, usebecome
to change this.SupervisorStrategy.Restart$
Restart()
SupervisorStrategy.Resume$
Resume()
SupervisorStrategy.Stop$
Stop()
void
strategy_$eq(SupervisorStrategy x$1)
void
super$postRestart(java.lang.Throwable reason)
void
super$postStop()
void
super$preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
void
super$preStart()
SupervisorStrategy
super$supervisorStrategy()
void
superviseWith(SupervisorStrategy s)
Set the supervisor strategy of this actor, i.e.SupervisorStrategy
supervisorStrategy()
User overridable definition the strategy to use for supervising child actors.void
unbecome()
Pop the active behavior from the behavior stack of this actor.void
whenFailing(scala.Function2<java.lang.Throwable,scala.Option<java.lang.Object>,scala.runtime.BoxedUnit> body)
Replace thepreRestart
action with the supplied function.void
whenRestarted(scala.Function1<java.lang.Throwable,scala.runtime.BoxedUnit> body)
Replace thepostRestart
action with the supplied function.void
whenStarting(scala.Function0<scala.runtime.BoxedUnit> body)
Replace thepreStart
action with the supplied thunk.void
whenStopping(scala.Function0<scala.runtime.BoxedUnit> body)
Replace thepostStop
action with the supplied thunk.-
Methods inherited from interface akka.actor.Actor
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, self, sender, unhandled
-
-
-
-
Method Detail
-
AllForOneStrategy
AllForOneStrategy$ AllForOneStrategy()
- Returns:
- (undocumented)
- See Also:
AllForOneStrategy
-
Escalate
SupervisorStrategy.Escalate$ Escalate()
- Returns:
- (undocumented)
- See Also:
SupervisorStrategy
-
OneForOneStrategy
OneForOneStrategy$ OneForOneStrategy()
- Returns:
- (undocumented)
- See Also:
OneForOneStrategy
-
Restart
SupervisorStrategy.Restart$ Restart()
- Returns:
- (undocumented)
- See Also:
SupervisorStrategy
-
Resume
SupervisorStrategy.Resume$ Resume()
- Returns:
- (undocumented)
- See Also:
SupervisorStrategy
-
Stop
SupervisorStrategy.Stop$ Stop()
- Returns:
- (undocumented)
- See Also:
SupervisorStrategy
-
become
void become(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> r)
Replace the behavior at the top of the behavior stack for this actor. The stack is cleared upon restart. Useunbecome()
to pop an element off this stack orbecomeStacked()
to push a new element on top of it.- Parameters:
r
- (undocumented)
-
becomeStacked
void becomeStacked(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> r)
Add the given behavior on top of the behavior stack for this actor. This stack is cleared upon restart. Useunbecome()
to pop an element off this stack.- Parameters:
r
- (undocumented)
-
postRestart
void postRestart(java.lang.Throwable cause)
Description copied from interface:Actor
User overridable callback: By default it callspreStart()
.- Specified by:
postRestart
in interfaceActor
- Parameters:
cause
- the Throwable that caused the restart to happen Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.
-
postRestartFun_$eq
void postRestartFun_$eq(scala.Function1<java.lang.Throwable,scala.runtime.BoxedUnit> x$1)
-
postStop
void postStop()
Description copied from interface:Actor
User overridable callback. Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.
-
postStopFun_$eq
void postStopFun_$eq(scala.Function0<scala.runtime.BoxedUnit> x$1)
-
preRestart
void preRestart(java.lang.Throwable cause, scala.Option<java.lang.Object> msg)
Description copied from interface:Actor
Scala API: User overridable callback: '''By default it disposes of all children and then callspostStop()
.'''- Specified by:
preRestart
in interfaceActor
- Parameters:
cause
- the Throwable that caused the restart to happenmsg
- optionally the current message the actor processed when failing, if applicable Is called on a crashed Actor right BEFORE it is restarted to allow clean up of resources before Actor is terminated.
-
preRestartFun_$eq
void preRestartFun_$eq(scala.Function2<java.lang.Throwable,scala.Option<java.lang.Object>,scala.runtime.BoxedUnit> x$1)
-
preStart
void preStart()
Description copied from interface:Actor
User overridable callback. Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.
-
preStartFun_$eq
void preStartFun_$eq(scala.Function0<scala.runtime.BoxedUnit> x$1)
-
receive
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Default behavior of the actor is empty, usebecome
to change this.
-
strategy_$eq
void strategy_$eq(SupervisorStrategy x$1)
-
super$postRestart
void super$postRestart(java.lang.Throwable reason)
-
super$postStop
void super$postStop()
-
super$preRestart
void super$preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
-
super$preStart
void super$preStart()
-
super$supervisorStrategy
SupervisorStrategy super$supervisorStrategy()
-
superviseWith
void superviseWith(SupervisorStrategy s)
Set the supervisor strategy of this actor, i.e. how it supervises its children.- Parameters:
s
- (undocumented)
-
supervisorStrategy
SupervisorStrategy supervisorStrategy()
Description copied from interface:Actor
User overridable definition the strategy to use for supervising child actors.- Specified by:
supervisorStrategy
in interfaceActor
- Returns:
- (undocumented)
-
unbecome
void unbecome()
Pop the active behavior from the behavior stack of this actor. This stack is cleared upon restart.
-
whenFailing
void whenFailing(scala.Function2<java.lang.Throwable,scala.Option<java.lang.Object>,scala.runtime.BoxedUnit> body)
Replace thepreRestart
action with the supplied function. Default action is to callsuper.preRestart()
, which will kill all children and invokepostStop()
.- Parameters:
body
- (undocumented)
-
whenRestarted
void whenRestarted(scala.Function1<java.lang.Throwable,scala.runtime.BoxedUnit> body)
Replace thepostRestart
action with the supplied function. Default action is to callsuper.postRestart
which will callpreStart()
.- Parameters:
body
- (undocumented)
-
whenStarting
void whenStarting(scala.Function0<scala.runtime.BoxedUnit> body)
Replace thepreStart
action with the supplied thunk. Default action is to callsuper.preStart()
- Parameters:
body
- (undocumented)
-
whenStopping
void whenStopping(scala.Function0<scala.runtime.BoxedUnit> body)
Replace thepostStop
action with the supplied thunk. Default action is to callsuper.postStop
.- Parameters:
body
- (undocumented)
-
-