Class FinishRequestException
- All Implemented Interfaces:
ResponseValueWrapper,Serializable
This class achieves this by bringing two things together: Being an exception for the control-flow part (stop
handling the request immediately) and implementing ResponseValueWrapper to provide an arbitrary value as
if it were returned from a handler.
The latter causes the framework to select an appropriate ResponseFactory for that wrapped value. This uses
the normal mechanism to handle response values, but will usually be one of two cases: Either the response value is
JSON-able (normal response, as well as standard error response) or is a Response itself (redirect,
request for HTTP authentication, or similar).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter method for the response value wrapped by this wrapper.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FinishRequestException
Constructor.- Parameters:
responseValue- the response value to respond
-
-
Method Details
-
getWrappedResponseValue
Description copied from interface:ResponseValueWrapperGetter method for the response value wrapped by this wrapper.If the wrapped value is itself an instance of this interface, then the implementation does not have to unwrap that wrapper too -- the caller of this method is expected to unwrap as often as possible.
- Specified by:
getWrappedResponseValuein interfaceResponseValueWrapper- Returns:
- the wrapped response value
-