Class ProxyServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.eclipse.jetty.proxy.AbstractProxyServlet
org.eclipse.jetty.proxy.ProxyServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
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(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
      Overrides:
      service in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • proxyRequestContent

      protected Request.Content proxyRequestContent(javax.servlet.http.HttpServletRequest request, javax.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(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Specified by:
      newProxyResponseListener in class AbstractProxyServlet
    • onResponseContent

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

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