Package org.apache.tapestry5.http
Interface AsyncRequestHandler
public interface AsyncRequestHandler
Service whose implementations define whether a given request should be handled
asynchronously or not and, if yes, which Executor
(usually, a thread pool,
but not necessarily) should handle it, possibly different HttpServletRequest
and HttpServletResponse
objects to be used when calling
HttpServletRequest#startAsync()} and an optional AsyncListener.
If one AsyncRequestHandler
doesn't tells the request should be asynchronous,
the next one contributed to AsyncRequestService
will be called
and so on until one says the request should be asynchronous or all of them
were called and the request will be synchronous.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionhandle
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Returns whether this request is handled by this handler.
-
Method Details
-
handle
AsyncRequestHandlerResponse handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Returns whether this request is handled by this handler. If not, it should returnAsyncRequestHandlerResponse.notHandled()
.- Returns:
- a non-null AsyncRequestHandlerResponse.
-