Package akka.actor

Class FSM.State<S,​D>

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product, scala.Serializable
    Direct Known Subclasses:
    FSM.SilentState
    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 Detail

      • State

        public 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()
      • notifies

        public boolean notifies()
        INTERNAL API
        Returns:
        (undocumented)
      • copy

        public FSM.State<S,​D> copy​(S stateName,
                                         D stateData,
                                         scala.Option<scala.concurrent.duration.FiniteDuration> timeout,
                                         scala.Option<FSM.Reason> stopReason,
                                         scala.collection.immutable.List<java.lang.Object> replies)
      • copy$default$1

        public S copy$default$1()
      • copy$default$2

        public D copy$default$2()
      • copy$default$3

        public scala.Option<scala.concurrent.duration.FiniteDuration> copy$default$3()
      • copy$default$4

        public scala.Option<FSM.Reason> copy$default$4()
      • copy$default$5

        public scala.collection.immutable.List<java.lang.Object> copy$default$5()
      • 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)
      • forMax

        public FSM.State<S,​D> forMax​(java.time.Duration timeout)
        JAVA API: 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 nextStateData)
        Modify state transition descriptor with new state data. The data will be set when transitioning to the new state.
        Parameters:
        nextStateData - (undocumented)
        Returns:
        (undocumented)
      • withStopReason

        public FSM.State<S,​D> withStopReason​(FSM.Reason reason)
        INTERNAL API.
        Parameters:
        reason - (undocumented)
        Returns:
        (undocumented)
      • withNotification

        public FSM.State<S,​D> withNotification​(boolean notifies)
        INTERNAL API.
        Parameters:
        notifies - (undocumented)
        Returns:
        (undocumented)
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object