Package akka.actor

Class AbstractFSM<S,​D>

    • Constructor Detail

      • AbstractFSM

        public AbstractFSM()
    • Method Detail

      • NullFunction

        public static <S,​D> scala.PartialFunction<S,​D> NullFunction()
        A partial function value which does not match anything and can be used to &ldquo;reset&rdquo; whenUnhandled and onTermination handlers.

        
         onTermination(FSM.NullFunction())
         
        Returns:
        (undocumented)
      • sender

        public static final ActorRef sender()
      • aroundReceive

        protected static void aroundReceive​(scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receive,
                                            java.lang.Object msg)
      • aroundPreStart

        protected static void aroundPreStart()
      • aroundPostStop

        protected static void aroundPostStop()
      • aroundPreRestart

        protected static void aroundPreRestart​(java.lang.Throwable reason,
                                               scala.Option<java.lang.Object> message)
      • aroundPostRestart

        protected static void aroundPostRestart​(java.lang.Throwable reason)
      • preStart

        public static void preStart()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • preRestart

        public static void preRestart​(java.lang.Throwable reason,
                                      scala.Option<java.lang.Object> message)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • postRestart

        public static void postRestart​(java.lang.Throwable reason)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unhandled

        public static void unhandled​(java.lang.Object message)
      • listenerManagement

        protected static scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> listenerManagement()
      • gossip

        protected static void gossip​(java.lang.Object msg,
                                     ActorRef sender)
      • gossip$default$2

        protected static ActorRef gossip$default$2​(java.lang.Object msg)
      • akka$actor$ActorLogging$$_log

        public static LoggingAdapter akka$actor$ActorLogging$$_log()
      • akka$actor$ActorLogging$$_log_$eq

        public static void akka$actor$ActorLogging$$_log_$eq​(LoggingAdapter x$1)
      • when$default$2

        public static final scala.concurrent.duration.FiniteDuration when$default$2()
      • startWith$default$3

        public static final scala.Option<scala.concurrent.duration.FiniteDuration> startWith$default$3()
      • stay

        public static final FSM.State<S,​D> stay()
      • stop

        public static final FSM.State<S,​D> stop()
      • setTimer$default$4

        public static final boolean setTimer$default$4()
      • cancelTimer

        public static final void cancelTimer​(java.lang.String name)
      • isTimerActive

        public static final boolean isTimerActive​(java.lang.String name)
      • setStateTimeout

        public static final void setStateTimeout​(S state,
                                                 scala.Option<scala.concurrent.duration.FiniteDuration> timeout)
      • isStateTimerActive

        public static final boolean isStateTimerActive()
      • total2pf

        public static final scala.PartialFunction<scala.Tuple2<S,​S>,​scala.runtime.BoxedUnit> total2pf​(scala.Function2<S,​S,​scala.runtime.BoxedUnit> transitionHandler)
      • initialize

        public static final void initialize()
      • stateName

        public static final S stateName()
      • stateData

        public static final D stateData()
      • nextStateData

        public static final D nextStateData()
      • debugEvent

        public static boolean debugEvent()
      • akka$actor$FSM$$currentState

        public static FSM.State<S,​D> akka$actor$FSM$$currentState()
      • akka$actor$FSM$$currentState_$eq

        public static void akka$actor$FSM$$currentState_$eq​(FSM.State<S,​D> x$1)
      • akka$actor$FSM$$timeoutFuture

        public static scala.Option<Cancellable> akka$actor$FSM$$timeoutFuture()
      • akka$actor$FSM$$timeoutFuture_$eq

        public static void akka$actor$FSM$$timeoutFuture_$eq​(scala.Option<Cancellable> x$1)
      • akka$actor$FSM$$nextState

        public static FSM.State<S,​D> akka$actor$FSM$$nextState()
      • akka$actor$FSM$$nextState_$eq

        public static void akka$actor$FSM$$nextState_$eq​(FSM.State<S,​D> x$1)
      • akka$actor$FSM$$generation

        public static long akka$actor$FSM$$generation()
      • akka$actor$FSM$$generation_$eq

        public static void akka$actor$FSM$$generation_$eq​(long x$1)
      • akka$actor$FSM$$timers

        public static scala.collection.mutable.Map<java.lang.String,​FSM.Timer> akka$actor$FSM$$timers()
      • akka$actor$FSM$$timerGen

        public static scala.collection.Iterator<java.lang.Object> akka$actor$FSM$$timerGen()
      • akka$actor$FSM$$stateFunctions

        public static scala.collection.mutable.Map<S,​scala.PartialFunction<FSM.Event<D>,​FSM.State<S,​D>>> akka$actor$FSM$$stateFunctions()
      • akka$actor$FSM$$stateTimeouts

        public static scala.collection.mutable.Map<S,​scala.Option<scala.concurrent.duration.FiniteDuration>> akka$actor$FSM$$stateTimeouts()
      • akka$actor$FSM$$handleEventDefault

        public static scala.PartialFunction<FSM.Event<D>,​FSM.State<S,​D>> akka$actor$FSM$$handleEventDefault()
      • akka$actor$FSM$$handleEvent

        public static scala.PartialFunction<FSM.Event<D>,​FSM.State<S,​D>> akka$actor$FSM$$handleEvent()
      • akka$actor$FSM$$handleEvent_$eq

        public static void akka$actor$FSM$$handleEvent_$eq​(scala.PartialFunction<FSM.Event<D>,​FSM.State<S,​D>> x$1)
      • akka$actor$FSM$$terminateEvent

        public static scala.PartialFunction<FSM.StopEvent<S,​D>,​scala.runtime.BoxedUnit> akka$actor$FSM$$terminateEvent()
      • akka$actor$FSM$$terminateEvent_$eq

        public static void akka$actor$FSM$$terminateEvent_$eq​(scala.PartialFunction<FSM.StopEvent<S,​D>,​scala.runtime.BoxedUnit> x$1)
      • akka$actor$FSM$$transitionEvent

        public static scala.collection.immutable.List<scala.PartialFunction<scala.Tuple2<S,​S>,​scala.runtime.BoxedUnit>> akka$actor$FSM$$transitionEvent()
      • akka$actor$FSM$$transitionEvent_$eq

        public static void akka$actor$FSM$$transitionEvent_$eq​(scala.collection.immutable.List<scala.PartialFunction<scala.Tuple2<S,​S>,​scala.runtime.BoxedUnit>> x$1)
      • receive

        public static scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receive()
      • processEvent

        public static void processEvent​(FSM.Event<D> event,
                                        java.lang.Object source)
      • applyState

        public static void applyState​(FSM.State<S,​D> nextState)
      • makeTransition

        public static void makeTransition​(FSM.State<S,​D> nextState)
      • postStop

        public static void postStop()
      • logTermination

        protected static void logTermination​(FSM.Reason reason)
      • akka$actor$FSM$_setter_$$minus$greater_$eq

        protected abstract static void akka$actor$FSM$_setter_$$minus$greater_$eq​(FSM.$minus$greater$ x$1)
      • akka$actor$FSM$_setter_$akka$actor$FSM$$timers_$eq

        protected abstract static void akka$actor$FSM$_setter_$akka$actor$FSM$$timers_$eq​(scala.collection.mutable.Map<java.lang.String,​FSM.Timer> x$1)
      • akka$actor$FSM$_setter_$akka$actor$FSM$$timerGen_$eq

        protected abstract static void akka$actor$FSM$_setter_$akka$actor$FSM$$timerGen_$eq​(scala.collection.Iterator<java.lang.Object> x$1)
      • akka$actor$FSM$_setter_$akka$actor$FSM$$stateFunctions_$eq

        protected abstract static void akka$actor$FSM$_setter_$akka$actor$FSM$$stateFunctions_$eq​(scala.collection.mutable.Map<S,​scala.PartialFunction<FSM.Event<D>,​FSM.State<S,​D>>> x$1)
      • akka$actor$FSM$_setter_$akka$actor$FSM$$stateTimeouts_$eq

        protected abstract static void akka$actor$FSM$_setter_$akka$actor$FSM$$stateTimeouts_$eq​(scala.collection.mutable.Map<S,​scala.Option<scala.concurrent.duration.FiniteDuration>> x$1)
      • akka$actor$FSM$_setter_$akka$actor$FSM$$handleEventDefault_$eq

        protected abstract static void akka$actor$FSM$_setter_$akka$actor$FSM$$handleEventDefault_$eq​(scala.PartialFunction<FSM.Event<D>,​FSM.State<S,​D>> x$1)
      • $minus$greater

        public FSM.$minus$greater$ $minus$greater()
        Description copied from interface: FSM
        This extractor is just convenience for matching a (S, S) pair, including a reminder what the new state is.
        Specified by:
        $minus$greater in interface FSM<S,​D>
        Returns:
        (undocumented)
      • StateTimeout

        public FSM.StateTimeout$ StateTimeout()
        Description copied from interface: FSM
        This case object is received in case of a state timeout.
        Specified by:
        StateTimeout in interface FSM<S,​D>
        Returns:
        (undocumented)
      • akka$actor$FSM$_setter_$StateTimeout_$eq

        protected void akka$actor$FSM$_setter_$StateTimeout_$eq​(FSM.StateTimeout$ x$1)
        Description copied from interface: FSM
        This case object is received in case of a state timeout.
        Specified by:
        akka$actor$FSM$_setter_$StateTimeout_$eq in interface FSM<S,​D>
        Parameters:
        x$1 - (undocumented)
      • context

        public ActorContext context()
        Description copied from interface: Actor
        Scala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such as forward.

        WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!

        ActorContext is the Scala API. getContext returns a AbstractActor.ActorContext, which is the Java API of the actor context.

        Specified by:
        context in interface Actor
        Returns:
        (undocumented)
      • self

        public final ActorRef self()
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        self in interface Actor
        Returns:
        (undocumented)
      • akka$actor$Actor$_setter_$context_$eq

        protected void akka$actor$Actor$_setter_$context_$eq​(ActorContext x$1)
        Description copied from interface: Actor
        Scala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such as forward.

        WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!

        ActorContext is the Scala API. getContext returns a AbstractActor.ActorContext, which is the Java API of the actor context.

        Specified by:
        akka$actor$Actor$_setter_$context_$eq in interface Actor
        Parameters:
        x$1 - (undocumented)
      • akka$actor$Actor$_setter_$self_$eq

        protected final void akka$actor$Actor$_setter_$self_$eq​(ActorRef x$1)
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        akka$actor$Actor$_setter_$self_$eq in interface Actor
        Parameters:
        x$1 - (undocumented)
      • getContext

        public AbstractActor.ActorContext getContext()
        Returns this AbstractActor's ActorContext The ActorContext is not thread safe so do not expose it outside of the AbstractActor.
        Returns:
        (undocumented)
      • getSelf

        public ActorRef getSelf()
        Returns the ActorRef for this actor.

        Same as self().

        Returns:
        (undocumented)
      • getSender

        public ActorRef getSender()
        The reference sender Actor of the currently processed message. This is always a legal destination to send to, even if there is no logical recipient for the reply, in which case it will be sent to the dead letter mailbox.

        Same as sender().

        WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!

        Returns:
        (undocumented)
      • when

        public final void when​(S stateName,
                               scala.PartialFunction<FSM.Event<D>,​FSM.State<S,​D>> stateFunction)
        Insert a new StateFunction at the end of the processing chain for the given state.

        Parameters:
        stateName - designator for the state
        stateFunction - partial function describing response to input
      • when

        public final void when​(S stateName,
                               FSMStateFunctionBuilder<S,​D> stateFunctionBuilder)
        Insert a new StateFunction at the end of the processing chain for the given state.

        Parameters:
        stateName - designator for the state
        stateFunctionBuilder - partial function builder describing response to input
      • when

        public final void when​(S stateName,
                               scala.concurrent.duration.FiniteDuration stateTimeout,
                               FSMStateFunctionBuilder<S,​D> stateFunctionBuilder)
        Insert a new StateFunction at the end of the processing chain for the given state. If the stateTimeout parameter is set, entering this state without a differing explicit timeout setting will trigger a StateTimeout event; the same is true when using #stay.

        Parameters:
        stateName - designator for the state
        stateTimeout - default state timeout for this state
        stateFunctionBuilder - partial function builder describing response to input
      • when

        public final void when​(S stateName,
                               java.time.Duration stateTimeout,
                               FSMStateFunctionBuilder<S,​D> stateFunctionBuilder)
        Insert a new StateFunction at the end of the processing chain for the given state. If the stateTimeout parameter is set, entering this state without a differing explicit timeout setting will trigger a StateTimeout event; the same is true when using #stay.

        Parameters:
        stateName - designator for the state
        stateTimeout - default state timeout for this state
        stateFunctionBuilder - partial function builder describing response to input
      • startWith

        public final void startWith​(S stateName,
                                    D stateData)
        Set initial state. Call this method from the constructor before the initialize() method. If different state is needed after a restart this method, followed by initialize(), can be used in the actor life cycle hooks Actor.preStart() and Actor.postRestart(java.lang.Throwable).

        Parameters:
        stateName - initial state designator
        stateData - initial state data
      • startWith

        public final void startWith​(S stateName,
                                    D stateData,
                                    scala.concurrent.duration.FiniteDuration timeout)
        Set initial state. Call this method from the constructor before the initialize() method. If different state is needed after a restart this method, followed by initialize(), can be used in the actor life cycle hooks Actor.preStart() and Actor.postRestart(java.lang.Throwable).

        Parameters:
        stateName - initial state designator
        stateData - initial state data
        timeout - state timeout for the initial state, overriding the default timeout for that state
      • startWith

        public final void startWith​(S stateName,
                                    D stateData,
                                    java.time.Duration timeout)
        Set initial state. Call this method from the constructor before the initialize() method. If different state is needed after a restart this method, followed by initialize(), can be used in the actor life cycle hooks Actor.preStart() and Actor.postRestart(java.lang.Throwable).

        Parameters:
        stateName - initial state designator
        stateData - initial state data
        timeout - state timeout for the initial state, overriding the default timeout for that state
      • onTransition

        public final void onTransition​(FSMTransitionHandlerBuilder<S> transitionHandlerBuilder)
        Add a handler which is called upon each state transition, i.e. not when staying in the same state.

        Multiple handlers may be installed, and every one of them will be called, not only the first one matching.

        Parameters:
        transitionHandlerBuilder - (undocumented)
      • onTransition

        public final void onTransition​(FI.UnitApply2<S,​S> transitionHandler)
        Add a handler which is called upon each state transition, i.e. not when staying in the same state.

        Multiple handlers may be installed, and every one of them will be called, not only the first one matching.

        Parameters:
        transitionHandler - (undocumented)
      • whenUnhandled

        public final void whenUnhandled​(FSMStateFunctionBuilder<S,​D> stateFunctionBuilder)
        Set handler which is called upon reception of unhandled messages. Calling this method again will overwrite the previous contents.

        The current state may be queried using stateName.

        Parameters:
        stateFunctionBuilder - (undocumented)
      • onTermination

        public final void onTermination​(FSMStopBuilder<S,​D> stopBuilder)
        Set handler which is called upon termination of this FSM actor. Calling this method again will overwrite the previous contents.
        Parameters:
        stopBuilder - (undocumented)
      • matchEvent

        public final <ET,​DT extends DFSMStateFunctionBuilder<S,​D> matchEvent​(java.lang.Class<ET> eventType,
                                                                                           java.lang.Class<DT> dataType,
                                                                                           FI.TypedPredicate2<ET,​DT> predicate,
                                                                                           FI.Apply2<ET,​DT,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches on an event and data type and a predicate.

        Parameters:
        eventType - the event type to match on
        dataType - the data type to match on
        predicate - a predicate to evaluate on the matched types
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEvent

        public final <ET,​DT extends DFSMStateFunctionBuilder<S,​D> matchEvent​(java.lang.Class<ET> eventType,
                                                                                           java.lang.Class<DT> dataType,
                                                                                           FI.Apply2<ET,​DT,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches on an event and data type.

        Parameters:
        eventType - the event type to match on
        dataType - the data type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEvent

        public final <ET> FSMStateFunctionBuilder<S,​D> matchEvent​(java.lang.Class<ET> eventType,
                                                                        FI.TypedPredicate2<ET,​D> predicate,
                                                                        FI.Apply2<ET,​D,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches if the event type and predicate matches.

        Parameters:
        eventType - the event type to match on
        predicate - a predicate that will be evaluated on the data and the event
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEvent

        public final <ET> FSMStateFunctionBuilder<S,​D> matchEvent​(java.lang.Class<ET> eventType,
                                                                        FI.Apply2<ET,​D,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches if the event type matches.

        Parameters:
        eventType - the event type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEvent

        public final FSMStateFunctionBuilder<S,​D> matchEvent​(FI.TypedPredicate2<java.lang.Object,​D> predicate,
                                                                   FI.Apply2<java.lang.Object,​D,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches if the predicate matches.

        Parameters:
        predicate - a predicate that will be evaluated on the data and the event
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEvent

        public final <DT extends DFSMStateFunctionBuilder<S,​D> matchEvent​(java.util.List<java.lang.Object> eventMatches,
                                                                                  java.lang.Class<DT> dataType,
                                                                                  FI.Apply2<java.lang.Object,​DT,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        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.

        Parameters:
        eventMatches - a list of types or instances to match against
        dataType - the data type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEvent

        public final FSMStateFunctionBuilder<S,​D> matchEvent​(java.util.List<java.lang.Object> eventMatches,
                                                                   FI.Apply2<java.lang.Object,​D,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches if any of the event types in the list match or any of the event instances in the list compares equal.

        Parameters:
        eventMatches - a list of types or instances to match against
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEventEquals

        public final <E,​DT extends DFSMStateFunctionBuilder<S,​D> matchEventEquals​(E event,
                                                                                                java.lang.Class<DT> dataType,
                                                                                                FI.Apply2<E,​DT,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches on the data type and if the event compares equal.

        Parameters:
        event - an event to compare equal against
        dataType - the data type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchEventEquals

        public final <E> FSMStateFunctionBuilder<S,​D> matchEventEquals​(E event,
                                                                             FI.Apply2<E,​D,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches if the event compares equal.

        Parameters:
        event - an event to compare equal against
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchAnyEvent

        public final FSMStateFunctionBuilder<S,​D> matchAnyEvent​(FI.Apply2<java.lang.Object,​D,​FSM.State<S,​D>> apply)
        Create an FSMStateFunctionBuilder with the first case statement set.

        A case statement that matches on any type of event.

        Parameters:
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchState

        public final FSMTransitionHandlerBuilder<S> matchState​(S fromState,
                                                               S toState,
                                                               FI.UnitApplyVoid apply)
        Create an FSMTransitionHandlerBuilder with the first case statement set.

        A case statement that matches on a from state and a to state.

        Parameters:
        fromState - the from state to match on
        toState - the to state to match on
        apply - an action to apply when the states match
        Returns:
        the builder with the case statement added
      • matchState

        public final FSMTransitionHandlerBuilder<S> matchState​(S fromState,
                                                               S toState,
                                                               FI.UnitApply2<S,​S> apply)
        Create an FSMTransitionHandlerBuilder with the first case statement set.

        A case statement that matches on a from state and a to state.

        Parameters:
        fromState - the from state to match on
        toState - the to state to match on
        apply - an action to apply when the states match
        Returns:
        the builder with the case statement added
      • matchStop

        public final FSMStopBuilder<S,​D> matchStop​(FSM.Reason reason,
                                                         FI.UnitApply2<S,​D> apply)
        Create an FSMStopBuilder with the first case statement set.

        A case statement that matches on an FSM.Reason.

        Parameters:
        reason - the reason for the termination
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchStop

        public final <RT extends FSM.ReasonFSMStopBuilder<S,​D> matchStop​(java.lang.Class<RT> reasonType,
                                                                                 FI.UnitApply3<RT,​S,​D> apply)
        Create an FSMStopBuilder with the first case statement set.

        A case statement that matches on a reason type.

        Parameters:
        reasonType - the reason type to match on
        apply - an action to apply to the reason, event and state data if there is a match
        Returns:
        the builder with the case statement added
      • matchStop

        public final <RT extends FSM.ReasonFSMStopBuilder<S,​D> matchStop​(java.lang.Class<RT> reasonType,
                                                                                 FI.TypedPredicate<RT> predicate,
                                                                                 FI.UnitApply3<RT,​S,​D> apply)
        Create an FSMStopBuilder with the first case statement set.

        A case statement that matches on a reason type and a predicate.

        Parameters:
        reasonType - the reason type to match on
        apply - an action to apply to the reason, event and state data if there is a match
        predicate - a predicate that will be evaluated on the reason if the type matches
        Returns:
        the builder with the case statement added
      • matchData

        public final <DT extends DUnitPFBuilder<D> matchData​(java.lang.Class<DT> dataType,
                                                               FI.UnitApply<DT> apply)
        Create a UnitPFBuilder with the first case statement set.

        Parameters:
        dataType - a type to match the argument against
        apply - an action to apply to the argument if the type matches
        Returns:
        a builder with the case statement added
      • matchData

        public final <DT extends DUnitPFBuilder<D> matchData​(java.lang.Class<DT> dataType,
                                                               FI.TypedPredicate<DT> predicate,
                                                               FI.UnitApply<DT> apply)
        Create a UnitPFBuilder with the first case statement set.

        Parameters:
        dataType - a type to match the argument against
        predicate - a predicate that will be evaluated on the argument if the type matches
        apply - an action to apply to the argument if the type and predicate matches
        Returns:
        a builder with the case statement added
      • goTo

        public final FSM.State<S,​D> goTo​(S nextStateName)
        Produce transition to other state. Return this from a state function in order to effect the transition.

        Parameters:
        nextStateName - state designator for the next state
        Returns:
        state transition descriptor
      • setTimer

        public final void setTimer​(java.lang.String name,
                                   java.lang.Object msg,
                                   scala.concurrent.duration.FiniteDuration timeout)
        Schedule named timer to deliver message after given delay, possibly repeating. Any existing timer with the same name will automatically be canceled before adding the new timer.
        Parameters:
        name - identifier to be used with cancelTimer()
        msg - message to be delivered
        timeout - delay of first message delivery and between subsequent messages
      • setTimer

        public final void setTimer​(java.lang.String name,
                                   java.lang.Object msg,
                                   java.time.Duration timeout)
        Schedule named timer to deliver message after given delay, possibly repeating. Any existing timer with the same name will automatically be canceled before adding the new timer.
        Parameters:
        name - identifier to be used with cancelTimer()
        msg - message to be delivered
        timeout - delay of first message delivery and between subsequent messages
      • setTimer

        public final void setTimer​(java.lang.String name,
                                   java.lang.Object msg,
                                   java.time.Duration timeout,
                                   boolean repeat)
        Schedule named timer to deliver message after given delay, possibly repeating. Any existing timer with the same name will automatically be canceled before adding the new timer.
        Parameters:
        name - identifier to be used with cancelTimer()
        msg - message to be delivered
        timeout - delay of first message delivery and between subsequent messages
        repeat - send once if false, scheduleAtFixedRate if true
      • Normal

        public FSM.Reason Normal()
        Default reason if calling stop().
        Returns:
        (undocumented)
      • Shutdown

        public FSM.Reason Shutdown()
        Reason given when someone was calling system.stop(fsm) from outside; also applies to Stop supervision directive.
        Returns:
        (undocumented)