public interface ResponseHandler
This interface defines a component that is capable of acting as a handler for a Response
. An
implementation of this interface is required to be passed alongside every Request
as part of the API (see
RequestHandler.handleRequest(Request, ResponseHandler)
and RequestHandler.handleRequest(Request,
ResponseHandler)
).
The jDISC API has intentionally been designed as not to provide a implicit reference from Response to corresponding Request, but rather leave that to the implementation of context-aware ResponseHandlers. By creating light-weight ResponseHandlers on a per-Request basis, any necessary reference can be embedded within.
Modifier and Type | Method and Description |
---|---|
ContentChannel |
handleResponse(Response response)
This method will process the given
Response and return a ContentChannel into which the caller
can write the Response's content. |
ContentChannel handleResponse(Response response)
This method will process the given Response
and return a ContentChannel
into which the caller
can write the Response's content.
response
- The Response to handle.Copyright © 2017. All rights reserved.