S
- the state typeD
- the data type
This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing.public class FSMStopBuilder<S,D>
extends java.lang.Object
FSM.onTermination(scala.PartialFunction<akka.actor.FSM.StopEvent<S, D>, scala.runtime.BoxedUnit>)
.Constructor and Description |
---|
FSMStopBuilder() |
Modifier and Type | Method and Description |
---|---|
scala.PartialFunction<PersistentFSM.StopEvent<S,D>,scala.runtime.BoxedUnit> |
build()
Build a
PartialFunction from this builder. |
<P extends PersistentFSM.Reason> |
stop(java.lang.Class<P> reasonType,
FI.TypedPredicate<P> predicate,
FI.UnitApply3<P,S,D> apply)
Add a case statement that matches on a reason type and a predicate.
|
<P extends PersistentFSM.Reason> |
stop(java.lang.Class<P> reasonType,
FI.UnitApply3<P,S,D> apply)
Add a case statement that matches on a reason type.
|
FSMStopBuilder<S,D> |
stop(PersistentFSM.Reason reason,
FI.UnitApply2<S,D> apply)
Add a case statement that matches on an
FSM.Reason . |
public FSMStopBuilder<S,D> stop(PersistentFSM.Reason reason, FI.UnitApply2<S,D> apply)
FSM.Reason
.reason
- the reason for the terminationapply
- an action to apply to the event and state data if there is a matchpublic <P extends PersistentFSM.Reason> FSMStopBuilder<S,D> stop(java.lang.Class<P> reasonType, FI.UnitApply3<P,S,D> apply)
P
- the reason type to match onreasonType
- the reason type to match onapply
- an action to apply to the reason, event and state data if there is a matchpublic <P extends PersistentFSM.Reason> FSMStopBuilder<S,D> stop(java.lang.Class<P> reasonType, FI.TypedPredicate<P> predicate, FI.UnitApply3<P,S,D> apply)
P
- the reason type to match onreasonType
- the reason type to match onapply
- an action to apply to the reason, event and state data if there is a matchpredicate
- a predicate that will be evaluated on the reason if the type matchespublic scala.PartialFunction<PersistentFSM.StopEvent<S,D>,scala.runtime.BoxedUnit> build()
PartialFunction
from this builder.
After this call the builder will be reset.