Class TestFSMRef<TActor, TState, TData>
This is a specialized form of the TestActorRef<TActor> with support for querying and setting the state of a FSM<TState, TData>.
Inherited Members
Namespace: Akka.TestKit
Assembly: Akka.TestKit.dll
Syntax
public class TestFSMRef<TActor, TState, TData> : TestActorRefBase<TActor>, IInternalActorRef, IActorRef, ICanTell, IEquatable<IActorRef>, IComparable<IActorRef>, ISurrogated, IComparable, IActorRefScope where TActor : FSM<TState, TData>
Type Parameters
Name | Description |
---|---|
TActor | The type of the actor. |
TState | The type of the state. |
TData | The type of the data. |
Constructors
| Improve this Doc View SourceTestFSMRef(ActorSystem, Props, IActorRef, String, Boolean)
TBD
Declaration
public TestFSMRef(ActorSystem system, Props props, IActorRef supervisor = null, string name = null, bool activateLogging = false)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | TBD |
Props | props | TBD |
IActorRef | supervisor | TBD |
String | name | TBD |
Boolean | activateLogging | TBD |
Properties
| Improve this Doc View SourceStateData
Get current state data of this FSM.
Declaration
public TData StateData { get; }
Property Value
Type | Description |
---|---|
TData |
StateName
Get current state name of this FSM.
Declaration
public TState StateName { get; }
Property Value
Type | Description |
---|---|
TState |
Methods
| Improve this Doc View SourceCancelTimer(String)
Proxy for CancelTimer(String)
Declaration
public void CancelTimer(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | TBD |
IsStateTimerActive()
Determines whether the FSM has a active state timer active.
Declaration
public bool IsStateTimerActive()
Returns
Type | Description |
---|---|
Boolean |
|
IsTimerActive(String)
Proxy for IsTimerActive(String)
Declaration
public bool IsTimerActive(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
SetState(TState, TData, Nullable<TimeSpan>, FSMBase.Reason)
Change FSM state. This method is directly equivalent to a corresponding transition initiated from within the FSM, including timeout and stop handling.
Declaration
public void SetState(TState stateName, TData stateData, TimeSpan? timeout = null, FSMBase.Reason stopReason = null)
Parameters
Type | Name | Description |
---|---|---|
TState | stateName | TBD |
TData | stateData | TBD |
Nullable<TimeSpan> | timeout | TBD |
FSMBase.Reason | stopReason | TBD |
SetState(TState, Nullable<TimeSpan>)
Change FSM state; but keeps the current state data. This method is directly equivalent to a transition initiated from within the FSM.
Declaration
public void SetState(TState stateName, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
TState | stateName | TBD |
Nullable<TimeSpan> | timeout | TBD |
SetStateData(TData, Nullable<TimeSpan>)
Change FSM state data; but do not transition to a new state name. This method is directly equivalent to a transition initiated from within the FSM.
Declaration
public void SetStateData(TData stateData, TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
TData | stateData | TBD |
Nullable<TimeSpan> | timeout | TBD |
SetStateTimeout(TimeSpan)
Change FSM state timeout. This method is directly equivalent to a transition initiated from within the FSM using the current state name and data but with the specified timeout.
Declaration
public void SetStateTimeout(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | TBD |
SetTimer(String, Object, TimeSpan, Boolean)
Declaration
public void SetTimer(string name, object msg, TimeSpan timeout, bool repeat = false)
Parameters
Type | Name | Description |
---|---|---|
String | name | TBD |
Object | msg | TBD |
TimeSpan | timeout | TBD |
Boolean | repeat | TBD |