Class Acteur.RespondWith

java.lang.Object
com.mastfrog.acteurbase.ActeurState<Response,com.mastfrog.acteur.ResponseImpl>
com.mastfrog.acteur.State
com.mastfrog.acteur.Acteur.RespondWith
Enclosing class:
Acteur

public class Acteur.RespondWith extends State
A shorthand state for responding with a particular http response code and optional message, which if non-string, will be rendered as JSON.
  • Field Details

    • page

      protected final Page page
  • Constructor Details

    • RespondWith

      public RespondWith(int status)
    • RespondWith

      public RespondWith(io.netty.handler.codec.http.HttpResponseStatus status)
    • RespondWith

      public RespondWith(int status, Object msg)
    • RespondWith

      public RespondWith(ErrorResponse err)
    • RespondWith

      public RespondWith(io.netty.handler.codec.http.HttpResponseStatus status, Object msg)
      Acteur.this; Response which uses JSON
      Parameters:
      status -
      msg -
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class ActeurState<Response,com.mastfrog.acteur.ResponseImpl>
    • getActeur

      public final Acteur getActeur()
      Description copied from class: State
      Returns whether (and by which action) the next event has to be processed prior to regular processing.
      Specified by:
      getActeur in class State
      Returns:
      the locked action; if null, then there is no prior action