FSMTState, TData Class |
Namespace: Akka.Actor
public abstract class FSM<TState, TData> : FSMBase, IListeners, IInternalSupportsTestFSMRef<TState, TData>
The FSMTState, TData type exposes the following members.
Name | Description | |
---|---|---|
FSMTState, TData |
Initializes a new instance of the FSM class.
|
Name | Description | |
---|---|---|
Listeners |
Retrieves the support needed to interact with an actor's listeners.
| |
NextStateData |
Return next state data (available in OnTransition(FSMTState, TDataTransitionHandler) handlers)
| |
Self |
Gets the self ActorRef
(Inherited from ActorBase.) | |
Sender |
Gets the sending ActorRef of the current message
(Inherited from ActorBase.) | |
StateData |
Current state data
| |
StateName |
Current state name
|
Name | Description | |
---|---|---|
AroundPostRestart |
Can be overridden to intercept calls to `PostRestart`. Calls `PostRestart` by default.
(Inherited from ActorBase.) | |
AroundPostStop |
Can be overridden to intercept calls to `PostStop`. Calls `PostStop` by default..
(Inherited from ActorBase.) | |
AroundPreRestart |
Can be overridden to intercept calls to `PreRestart`. Calls `PreRestart` by default.
(Inherited from ActorBase.) | |
AroundPreStart |
Can be overridden to intercept calls to `PreStart`. Calls `PreStart` by default.
(Inherited from ActorBase.) | |
AroundReceive |
TBD
(Inherited from ActorBase.) | |
Become |
Changes the actor's command behavior and replaces the current receive handler with the specified handler.
(Inherited from ActorBase.) | |
BecomeStacked |
Changes the actor's behavior and replaces the current receive handler with the specified handler.
The current handler is stored on a stack, and you can revert to it by calling UnbecomeStacked (Inherited from ActorBase.)Remarks Please note, that in order to not leak memory, make sure every call to BecomeStacked(Receive)
is matched with a call to UnbecomeStacked. | |
CancelTimer |
Cancel a named Timer, ensuring that the message is not subsequently delivered (no race.)
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GoTo(TState) |
Produce transition to other state. Return this from a state function
in order to effect the transition.
| |
GoTo(TState, TData) | Obsolete.
Obsolete. Use GoTo(nextStateName).Using(stateData) instead. | |
Initialize |
Verify the existence of initial state and setup timers. This should be the
last call within the constructor or PreStart and
PostRestart(Exception).
| |
IsTimerActive |
Determines whether the named timer is still active. Returns true
unless the timer does not exist, has previously been cancelled, or
if it was a single-shot timer whose message was already received.
| |
LogTermination |
By default, Failure is logged at error level and other
reason types are not logged. It is possible to override this behavior.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnTermination |
Set the handler which is called upon termination of this FSM actor. Calling this
method again will overwrite the previous contents.
| |
OnTransition |
Set handler which is called upon each state transition
| |
PostRestart |
User overridable callback: By default it calls `PreStart()`.
Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.
(Inherited from ActorBase.) | |
PostStop |
Call the OnTermination(ActionFSMBaseStopEventTState, TData) hook if you want to retain this behavior.
When overriding make sure to call base.PostStop();
Please note that this method is called by default from PreRestart(Exception, Object) so
override that one if OnTermination(ActionFSMBaseStopEventTState, TData) shall not be called during restart.
(Overrides ActorBasePostStop.) | |
PreRestart |
User overridable callback: '''By default it disposes of all children and then calls `postStop()`.'''
Is called on a crashed Actor right BEFORE it is restarted to allow clean
up of resources before Actor is terminated.
(Inherited from ActorBase.) | |
PreStart |
User overridable callback.
Is called when an Actor is started.
Actors are automatically started asynchronously when created.
Empty default implementation.
(Inherited from ActorBase.) | |
Receive |
Processor for user defined messages.
(Overrides ActorBaseReceive(Object).) | |
SetReceiveTimeout | Defines the inactivity timeout after which the sending of a ReceiveTimeout message is triggered. When specified, the receive function should be able to handle a ReceiveTimeout message. Please note that the receive timeout might fire and enqueue the ReceiveTimeout message right after another message was enqueued; hence it is not guaranteed that upon reception of the receive timeout there must have been an idle period beforehand as configured via this method. Once set, the receive timeout stays in effect (i.e. continues firing repeatedly after inactivity periods). Pass in null to switch off this feature. | |
SetStateTimeout |
Set the state timeout explicitly. This method can be safely used from
within a state handler.
| |
SetTimer |
Schedule named timer to deliver message after given delay, possibly repeating.
Any existing timer with the same name will automatically be canceled before adding
the new timer.
| |
StartWith |
Sets the initial state for this FSM. Call this method from the constructor before the Initialize method.
If different state is needed after a restart this method, followed by Initialize, can be used in the actor
life cycle hooks PreStart and PostRestart(Exception).
| |
Stay |
Produce "empty" transition descriptor. Return this from a state function
when no state change is to be effected.
| |
Stop |
Produce change descriptor to stop this FSM actor with FSMBaseReasonFSMBaseNormal | |
Stop(FSMBaseReason) |
Produce change descriptor to stop this FSM actor with the specified FSMBaseReason.
| |
Stop(FSMBaseReason, TData) |
Produce change descriptor to stop this FSM actor with the specified FSMBaseReason.
| |
SupervisorStrategy |
TBD
(Inherited from ActorBase.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Transform |
TBD
| |
UnbecomeStacked |
Reverts the Actor behavior to the previous one on the behavior stack.
(Inherited from ActorBase.) | |
Unhandled |
Is called when a message isn't handled by the current behavior of the actor
by default it fails with either a DeathPactException (in
case of an unhandled Terminated message) or publishes an UnhandledMessage
to the actor's system's EventStream (Inherited from ActorBase.) | |
When |
Insert a new FSMTState, TDataStateFunction at the end of the processing chain for the
given state. If the stateTimeout parameter is set, entering this state without a
differing explicit timeout setting will trigger a FSMBaseStateTimeout.
| |
WhenUnhandled |
Set handler which is called upon reception of unhandled FSM messages. Calling
this method again will overwrite the previous contents.
|
Name | Description | |
---|---|---|
DebugEvent |
Can be set to enable debugging on certain actions taken by the FSM
|
Name | Description | |
---|---|---|
AsInstanceOfT |
TBD
(Defined by Extensions.) | |
Match | Overloaded.
Matches the specified target.
(Defined by PatternMatch.) | |
MatchT | Overloaded.
Matches the specified target and return a result of target processing.
(Defined by PatternMatch.) |