|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.japi.pf.FSMStateFunctionBuilder<S,D>
S
- the state typeD
- the data typepublic class FSMStateFunctionBuilder<S,D>
Builder used to create a partial function for FSM.whenUnhandled(scala.PartialFunction
.
>)
Constructor Summary | |
---|---|
FSMStateFunctionBuilder()
|
Method Summary | ||
---|---|---|
FSMStateFunctionBuilder<S,D> |
anyEvent(FI.Apply2<java.lang.Object,D,FSM.State<S,D>> apply)
Add a case statement that matches on any type of event. |
|
scala.PartialFunction<FSM.Event<D>,FSM.State<S,D>> |
build()
Build a PartialFunction from this builder. |
|
|
event(java.lang.Class<P> eventType,
java.lang.Class<Q> dataType,
FI.Apply2<P,Q,FSM.State<S,D>> apply)
Add a case statement that matches on an event and data type. |
|
|
event(java.util.List<java.lang.Object> eventMatches,
java.lang.Class<Q> dataType,
FI.Apply<Q,FSM.State<S,D>> apply)
Add a case statement that matches on the data type and if any of the event types in the list match or any of the event instances in the list compares equal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FSMStateFunctionBuilder()
Method Detail |
---|
public <P,Q> FSMStateFunctionBuilder<S,D> event(java.lang.Class<P> eventType, java.lang.Class<Q> dataType, FI.Apply2<P,Q,FSM.State<S,D>> apply)
P
- the event type to match onQ
- the data type to match oneventType
- the event type to match ondataType
- the data type to match onapply
- an action to apply to the event and state data if there is a match
public <Q> FSMStateFunctionBuilder<S,D> event(java.util.List<java.lang.Object> eventMatches, java.lang.Class<Q> dataType, FI.Apply<Q,FSM.State<S,D>> apply)
Q
- the data type to match oneventMatches
- a list of types or instances to match againstdataType
- the data type to match onapply
- an action to apply to the event and state data if there is a match
public FSMStateFunctionBuilder<S,D> anyEvent(FI.Apply2<java.lang.Object,D,FSM.State<S,D>> apply)
apply
- an action to apply to the event and state data
public scala.PartialFunction<FSM.Event<D>,FSM.State<S,D>> build()
PartialFunction
from this builder.
After this call the builder will be reset.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |