Interface ResponseProcessor
- All Known Implementing Classes:
- HttpEntityProcessor,- HttpResourceProcessor,- HttpResponseProcessor,- InputStreamProcessor,- PlainTextPojoProcessor,- ReaderProcessor,- ResponseBeanProcessor,- SerializedPojoProcessor,- ThrowableProcessor
 The REST Server API uses the concept of registered response processors for converting objects returned by REST
 methods or set through RestResponse.setContent(Object) into appropriate HTTP responses.
 
Response processors can be associated with REST resources via the following:
Response processors can be used to process POJOs that cannot normally be handled through Juneau serializers, or because it's simply easier to define response processors for special cases.
 The following example shows how to create a response processor to handle special 
   
See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intReturn code indicating that processing is complete and to exit the chain.static final intReturn code indicating to proceed to the next response processor in the chain.static final intReturn code indicating to restart processing the chain from the beginning.
- 
Method SummaryModifier and TypeMethodDescriptionintprocess(RestOpSession opSession) Process this response if possible.
- 
Field Details- 
NEXTReturn code indicating to proceed to the next response processor in the chain.- See Also:
 
- 
FINISHEDReturn code indicating that processing is complete and to exit the chain.- See Also:
 
- 
RESTARTReturn code indicating to restart processing the chain from the beginning.- See Also:
 
 
- 
- 
Method Details- 
processProcess this response if possible.- Parameters:
- opSession- The HTTP call.
- Returns:
- One of the following codes:
   - 0 - The processor could not handle the request.
- 1 - The processor was able to fully handle the request.
- 2 - The processor was able to partially handle the request by replacing the output. The response processors should start over.
 
- Throws:
- IOException- If low-level exception occurred on output stream.
 Results in a- HttpServletResponse.SC_INTERNAL_SERVER_ERRORerror.
- BasicHttpException- If some other exception occurred.
 Can be used to provide an appropriate HTTP response code and message.
 
 
-