Uses of Interface
com.yahoo.jdisc.handler.ResponseHandler
Package
Description
Provides the common classes and interfaces of the jDISC core.
Provides classes and interfaces for implementing a
RequestHandler
.Provides classes and interfaces for implementing unit tests of jDISC components.
-
Uses of ResponseHandler in com.yahoo.jdisc
Modifier and TypeMethodDescriptionRequest.connect
(ResponseHandler responseHandler) Attempts to resolve and connect to theRequestHandler
appropriate for theURI
of this Request.static void
Response.dispatchTimeout
(ResponseHandler handler) This is a convenience method for creating a Response with statusResponse.Status.GATEWAY_TIMEOUT
and passing that to the givenhandleResponse(Response)
. -
Uses of ResponseHandler in com.yahoo.jdisc.handler
Modifier and TypeClassDescriptionclass
This is a convenient subclass ofRequestDispatch
that implements theCallable
interface.final class
This class provides an implementation ofResponseHandler
that allows you to wait for aResponse
to be returned.class
This class provides a convenient way of safely dispatching aRequest
.Modifier and TypeMethodDescriptionfinal ContentChannel
ResponseDispatch.connect
(ResponseHandler responseHandler) This methods callsResponseDispatch.newResponse()
to create a newResponse
, and then callshandleResponse(Response)
with that.final FastContentWriter
ResponseDispatch.connectFastWriter
(ResponseHandler responseHandler) Convenience method for constructing aFastContentWriter
over theContentChannel
returned by callingResponseDispatch.connect(ResponseHandler)
.final CompletableFuture<Boolean>
ResponseDispatch.dispatch
(ResponseHandler responseHandler) This method callsResponseDispatch.connect(ResponseHandler)
to establish aContentChannel
for theResponse
, and then iterates through all the ByteBuffers returned byResponseDispatch.responseContent()
and writes them to that ContentChannel.RequestHandler.handleRequest
(Request request, ResponseHandler handler) This method will process the givenRequest
and return aContentChannel
into which the caller can write the Request's content.protected void
ThreadedRequestHandler.handleRequest
(Request request, BufferedContentChannel requestContent, ResponseHandler responseHandler) Override this method if you want to access theRequest
's content using aBufferedContentChannel
.protected void
ThreadedRequestHandler.handleRequest
(Request request, ContentInputStream requestContent, ResponseHandler responseHandler) Implement this method if you want to access theRequest
's content using aContentInputStream
.protected void
ThreadedRequestHandler.handleRequest
(Request request, ReadableContentChannel requestContent, ResponseHandler responseHandler) Implement this method if you want to access theRequest
's content using aReadableContentChannel
.final ContentChannel
ThreadedRequestHandler.handleRequest
(Request request, ResponseHandler responseHandler) void
AbstractRequestHandler.handleTimeout
(Request request, ResponseHandler responseHandler) void
RequestHandler.handleTimeout
(Request request, ResponseHandler handler) This method is called by theContainer
when aRequest
that was previously accepted byRequestHandler.handleRequest(Request, ResponseHandler)
has timed out.ModifierConstructorDescriptionCallableResponseDispatch
(ResponseHandler handler) Constructs a new instances of this class over the givenResponseHandler
.FutureResponse
(ResponseHandler handler) Constructs a new FutureResponse that calls the givenResponseHandler
whenFutureResponse.handleResponse(Response)
is invoked. -
Uses of ResponseHandler in com.yahoo.jdisc.test
Modifier and TypeMethodDescriptionTestDriver.connectRequest
(String requestUri, ResponseHandler responseHandler) Convenience method to create andRequest.connect(ResponseHandler)
aRequest
on theCurrentContainer
.TestDriver.dispatchRequest
(String requestUri, ResponseHandler responseHandler) Convenience method to create aRequest
, connect it to aRequestHandler
, and close the returnedContentChannel
.NonWorkingClientProvider.handleRequest
(Request request, ResponseHandler handler) NonWorkingRequestHandler.handleRequest
(Request request, ResponseHandler handler) void
NonWorkingClientProvider.handleTimeout
(Request request, ResponseHandler handler) void
NonWorkingRequestHandler.handleTimeout
(Request request, ResponseHandler handler) TestDriver.newRequestDispatch
(String requestUri, ResponseHandler responseHandler)