Package com.mastfrog.acteur
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
A shorthand state for responding with a particular http response code and
optional message, which if non-string, will be rendered as JSON.
-
Field Summary
FieldsFields inherited from class com.mastfrog.acteurbase.ActeurState
creationStackTrace -
Constructor Summary
ConstructorsConstructorDescriptionRespondWith(int status) RespondWith(int status, Object msg) RespondWith(ErrorResponse err) RespondWith(io.netty.handler.codec.http.HttpResponseStatus status) RespondWith(io.netty.handler.codec.http.HttpResponseStatus status, Object msg) Acteur.this; Response which uses JSON -
Method Summary
Methods inherited from class com.mastfrog.acteur.State
getContext, getLockedPage, isLockedInChain, isRejectedMethods inherited from class com.mastfrog.acteurbase.ActeurState
context, isFinished
-
Field Details
-
page
-
-
Constructor Details
-
RespondWith
public RespondWith(int status) -
RespondWith
public RespondWith(io.netty.handler.codec.http.HttpResponseStatus status) -
RespondWith
-
RespondWith
-
RespondWith
Acteur.this; Response which uses JSON- Parameters:
status-msg-
-
-
Method Details
-
toString
- Overrides:
toStringin classActeurState<Response,com.mastfrog.acteur.ResponseImpl>
-
getActeur
Description copied from class:StateReturns whether (and by which action) the next event has to be processed prior to regular processing.
-