Class AsyncRequestHandlerResponse

java.lang.Object
org.apache.tapestry5.http.AsyncRequestHandlerResponse

public class AsyncRequestHandlerResponse extends Object
Class used by AsyncRequestHandler to return information on how to handle a request.
See Also:
  • Constructor Details

  • Method Details

    • with

      public AsyncRequestHandlerResponse with(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Defines a different request and response to be passed to ServletRequest.startAsync(javax.servlet.ServletRequest, javax.servlet.ServletResponse). Both cannot be null.
    • with

      public AsyncRequestHandlerResponse with(javax.servlet.AsyncListener listener)
      Defines a listener to be added to the asynchronous request. It cannot be null.
    • withTimeout

      Sets the timeout for this asynchronous request in milliseconds.
    • notHandled

      Returns a response saying this AsyncRequestHandler doesn't handle this request.
      Returns:
      an AsyncRequestHandlerResponse.
    • isAsync

      public boolean isAsync()
      Returns whether the request should be processed asynchronously or not.
    • getExecutor

      Returns the Executor to be used to process the request.
    • getRequest

      public javax.servlet.http.HttpServletRequest getRequest()
      Returns the request to be used with ServletRequest.startAsync() or null.
    • getResponse

      public javax.servlet.http.HttpServletResponse getResponse()
      Returns the response to be used with ServletRequest.startAsync() or null.
    • getListener

      public javax.servlet.AsyncListener getListener()
      Returns the listener to be added to the asynchronous request or null.
    • isHasRequestAndResponse

      public boolean isHasRequestAndResponse()
      Returns whether a request and a response were set in this object.
    • getTimeout

      public long getTimeout()
      Returns the timeout, in milliseconds, for the asynchronous request. Any value less than or equal zero is considered not having set a timeout.
    • toString

      public String toString()
      Overrides:
      toString in class Object