## org.mortbay.proxy
Class AsyncProxyServlet

    java.lang.Object
      org.mortbay.proxy.AsyncProxyServlet

All Implemented Interfaces:
  Servlet

Direct Known Subclasses:
  AsyncProxyServlet.Transparent

    public class AsyncProxyServlet

extends Object
implements Servlet

Asynchronous Proxy Servlet. Forward requests to another server either as a standard web proxy (as defined by RFC2616) or as a transparent proxy. This servlet needs the jetty-util and jetty-client classes to be available to the web application.

Nested Class Summary
`static class` `AsyncProxyServlet.Transparent` Transparent Proxy.

Field Summary
`protected HashSet<String>` `_DontProxyHeaders`

Constructor Summary
`AsyncProxyServlet()`

Method Summary
`void` `destroy()`
`ServletConfig` `getServletConfig()`
`String` `getServletInfo()`
`void` `handleConnect(HttpServletRequest request, HttpServletResponse response)`
`void` `init(ServletConfig config)`
`protected HttpURI` `proxyHttpURI(String scheme, String serverName, int serverPort, String uri)` /** Resolve requested URL to the Proxied HttpURI
`void` `service(ServletRequest req, ServletResponse res)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _DontProxyHeaders

    protected HashSet<String> _DontProxyHeaders

Constructor Detail

### AsyncProxyServlet

    public AsyncProxyServlet()

Method Detail

### init

    public void init(ServletConfig config)
              throws ServletException

  Specified by:
    `init` in interface `Servlet`
  Throws:
    `ServletException`

### getServletConfig

    public ServletConfig getServletConfig()

  Specified by:
    `getServletConfig` in interface `Servlet`

### service

    public void service(ServletRequest req,
                        ServletResponse res)
                 throws ServletException,
                        IOException

  Specified by:
    `service` in interface `Servlet`
  Throws:
    `ServletException`
    `IOException`

### proxyHttpURI

    protected HttpURI proxyHttpURI(String scheme,
                                   String serverName,
                                   int serverPort,
                                   String uri)
                            throws MalformedURLException

  /** Resolve requested URL to the Proxied HttpURI

  Parameters:
    `scheme` - The scheme of the received request.
    `serverName` - The server encoded in the received request(which may be from an absolute URL in the request line).
    `serverPort` - The server port of the received request (which may be from an absolute URL in the request line).
    `uri` - The URI of the received request.
  Returns:
    The HttpURI to which the request should be proxied.
  Throws:
    `MalformedURLException`

### handleConnect

    public void handleConnect(HttpServletRequest request,
                              HttpServletResponse response)
                       throws IOException

  Throws:
    `IOException`

### getServletInfo

    public String getServletInfo()

  Specified by:
    `getServletInfo` in interface `Servlet`

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `Servlet`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.