Class AsyncProxyServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
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(jakarta.servlet.http.HttpServletRequest request, jakarta.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 jakarta.servlet.ReadListener newReadListener(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Request proxyRequest, AsyncRequestContent content)
    • onResponseContent

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

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