Class ProxyServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
org.eclipse.jetty.ee10.proxy.ProxyServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
AsyncProxyServlet, BalancerServlet, ProxyServlet.Transparent

public class ProxyServlet extends AbstractProxyServlet

Servlet 3.0 asynchronous proxy servlet.

The request processing is asynchronous, but the I/O is blocking.

See Also:
  • Constructor Details

    • ProxyServlet

      public ProxyServlet()
  • Method Details

    • service

      protected void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Overrides:
      service in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
    • proxyRequestContent

      protected Request.Content proxyRequestContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Request proxyRequest) throws IOException
      Wraps the client-to-proxy request content in a Request.Content for the proxy-to-server request.
      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
    • newProxyResponseListener

      protected Response.Listener newProxyResponseListener(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Specified by:
      newProxyResponseListener in class AbstractProxyServlet
    • onResponseContent

      protected void onResponseContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Response proxyResponse, byte[] buffer, int offset, int length, Callback callback)
    • onContinue

      protected Runnable onContinue(jakarta.servlet.http.HttpServletRequest clientRequest, Request proxyRequest)
      Overrides:
      onContinue in class AbstractProxyServlet