Class State

java.lang.Object
com.mastfrog.acteurbase.ActeurState<Response,com.mastfrog.acteur.ResponseImpl>
com.mastfrog.acteur.State
Direct Known Subclasses:
Acteur.ConsumedLockedState, Acteur.ConsumedState, Acteur.RejectedState, Acteur.RespondWith

public abstract class State extends ActeurState<Response,com.mastfrog.acteur.ResponseImpl>
The output condition of an Acteur. An acteur must either set its state in its constructor, or override getState(). As of 1.6, Acteur has methods such as next(), reject(), reply() that will create one of these under-the=hood, so directly using this class is rare.
  • Field Details

    • page

      protected final Page page
  • Method Details

    • isRejected

      public boolean isRejected()
      Overrides:
      isRejected in class ActeurState<Response,com.mastfrog.acteur.ResponseImpl>
    • isLockedInChain

      @Deprecated protected boolean isLockedInChain()
      Deprecated.
      no longer used
      Returns whether the event processing has to be stopped after the processing by the chain the acteur producing this state belongs to - the request will not be processed by other "page" chains if this one rejects it.
      Returns:
      true if locked in chain
    • getLockedPage

      public final Page getLockedPage()
      Returns whether (and by which "page") the next event has to be processed prior to regular processing.
      Returns:
      the locked widget; if null, then there is no prior widget
    • getContext

      public final Object[] getContext()
    • getActeur

      public abstract Acteur getActeur()
      Returns whether (and by which action) the next event has to be processed prior to regular processing.
      Overrides:
      getActeur in class ActeurState<Response,com.mastfrog.acteur.ResponseImpl>
      Returns:
      the locked action; if null, then there is no prior action