Class ProxyHandler.Forward

All Implemented Interfaces:
Handler, Request.Handler, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle, Invocable
Enclosing class:
ProxyHandler

public static class ProxyHandler.Forward extends ProxyHandler

A ProxyHandler that can be used to implement a forward proxy server.

Forward proxies are configured in client applications that use HttpClient in this way:


 httpClient.getProxyConfiguration().addProxy(new HttpProxy(proxyHost, proxyPort));
 
See Also:
  • Constructor Details

    • Forward

      public Forward()
  • Method Details

    • rewriteHttpURI

      protected HttpURI rewriteHttpURI(Request clientToProxyRequest)

      Rewrites the client-to-proxy request URI to the proxy-to-server request URI.

      Applications that use this class should return the client-to-proxy request URI, since clients will send the absolute URI of the server.

      Specified by:
      rewriteHttpURI in class ProxyHandler
      Parameters:
      clientToProxyRequest - the client-to-proxy request
      Returns:
      the client-to-proxy request URI