Class AsyncProxyServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
AsyncProxyServlet.Transparent

public class AsyncProxyServlet extends ProxyServlet

Servlet 3.1 asynchronous proxy servlet.

Both the request processing and the I/O are asynchronous.

See Also:
  • Constructor Details

    • AsyncProxyServlet

      public AsyncProxyServlet()
  • Method Details

    • proxyRequestContent

      protected Request.Content proxyRequestContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest) throws IOException
      Description copied from class: ProxyServlet
      Wraps the client-to-proxy request content in a Request.Content for the proxy-to-server request.
      Overrides:
      proxyRequestContent in class ProxyServlet
      Parameters:
      request - the client-to-proxy request
      response - the proxy-to-client response
      proxyRequest - the proxy-to-server request
      Returns:
      a proxy-to-server request content
      Throws:
      IOException - if the proxy-to-server request content cannot be created
    • newReadListener

      protected javax.servlet.ReadListener newReadListener(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest, AsyncRequestContent content)
    • onResponseContent

      protected void onResponseContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Response proxyResponse, byte[] buffer, int offset, int length, Callback callback)
      Overrides:
      onResponseContent in class ProxyServlet
    • newWriteListener

      protected AsyncProxyServlet.StreamWriter newWriteListener(javax.servlet.http.HttpServletRequest request, Response proxyResponse)