akka.actor
Class FSM.State<S,D>

java.lang.Object
  extended by akka.actor.FSM.State<S,D>
All Implemented Interfaces:
java.io.Serializable, scala.Equals, scala.Product
Enclosing interface:
FSM<S,D>

public static class FSM.State<S,D>
extends java.lang.Object
implements scala.Product, scala.Serializable

This captures all of the managed state of the FSM: the state name, the state data, possibly custom timeout, stop reason and replies accumulated while processing the last message.

See Also:
Serialized Form

Constructor Summary
FSM.State(S stateName, D stateData, scala.Option<scala.concurrent.duration.FiniteDuration> timeout, scala.Option<FSM.Reason> stopReason, scala.collection.immutable.List<java.lang.Object> replies)
           
 
Method Summary
 FSM.State<S,D> forMax(scala.concurrent.duration.Duration timeout)
          Modify state transition descriptor to include a state timeout for the next state.
 scala.collection.immutable.List<java.lang.Object> replies()
           
 FSM.State<S,D> replying(java.lang.Object replyValue)
          Send reply to sender of the current message, if available.
 D stateData()
           
 S stateName()
           
 scala.Option<FSM.Reason> stopReason()
           
 scala.Option<scala.concurrent.duration.FiniteDuration> timeout()
           
 FSM.State<S,D> using(D nextStateDate)
          Modify state transition descriptor with new state data.
 FSM.State<S,D> withStopReason(FSM.Reason reason)
          INTERNAL API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

FSM.State

public FSM.State(S stateName,
                 D stateData,
                 scala.Option<scala.concurrent.duration.FiniteDuration> timeout,
                 scala.Option<FSM.Reason> stopReason,
                 scala.collection.immutable.List<java.lang.Object> replies)
Method Detail

stateName

public S stateName()

stateData

public D stateData()

timeout

public scala.Option<scala.concurrent.duration.FiniteDuration> timeout()

stopReason

public scala.Option<FSM.Reason> stopReason()

replies

public scala.collection.immutable.List<java.lang.Object> replies()

forMax

public FSM.State<S,D> forMax(scala.concurrent.duration.Duration timeout)
Modify state transition descriptor to include a state timeout for the next state. This timeout overrides any default timeout set for the next state.

Use Duration.Inf to deactivate an existing timeout.

Parameters:
timeout - (undocumented)
Returns:
(undocumented)

replying

public FSM.State<S,D> replying(java.lang.Object replyValue)
Send reply to sender of the current message, if available.

Parameters:
replyValue - (undocumented)
Returns:
this state transition descriptor

using

public FSM.State<S,D> using(D nextStateDate)
Modify state transition descriptor with new state data. The data will be set when transitioning to the new state.

Parameters:
nextStateDate - (undocumented)
Returns:
(undocumented)

withStopReason

public FSM.State<S,D> withStopReason(FSM.Reason reason)
INTERNAL API.

Parameters:
reason - (undocumented)
Returns:
(undocumented)