org.mortbay.proxy
Class AsyncProxyServlet.Transparent

java.lang.Object
  extended by org.mortbay.proxy.AsyncProxyServlet
      extended by org.mortbay.proxy.AsyncProxyServlet.Transparent
All Implemented Interfaces:
Servlet
Enclosing class:
AsyncProxyServlet

public static class AsyncProxyServlet.Transparent
extends AsyncProxyServlet

Transparent Proxy. This convenience extension to AsyncProxyServlet configures the servlet as a transparent proxy. The servlet is configured with init parameter:

For example, if a request was received at /foo/bar and the ProxyTo was http://host:80/context and the Prefix was /foo, then the request would be proxied to http://host:80/context/bar


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mortbay.proxy.AsyncProxyServlet
AsyncProxyServlet.Transparent
 
Field Summary
 
Fields inherited from class org.mortbay.proxy.AsyncProxyServlet
_DontProxyHeaders
 
Constructor Summary
AsyncProxyServlet.Transparent()
           
AsyncProxyServlet.Transparent(String prefix, String server, int port)
           
 
Method Summary
 void init(ServletConfig config)
           
protected  HttpURI proxyHttpURI(String scheme, String serverName, int serverPort, String uri)
          /** Resolve requested URL to the Proxied HttpURI
 
Methods inherited from class org.mortbay.proxy.AsyncProxyServlet
destroy, getServletConfig, getServletInfo, handleConnect, service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncProxyServlet.Transparent

public AsyncProxyServlet.Transparent()

AsyncProxyServlet.Transparent

public AsyncProxyServlet.Transparent(String prefix,
                                     String server,
                                     int port)
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class AsyncProxyServlet
Throws:
ServletException

proxyHttpURI

protected HttpURI proxyHttpURI(String scheme,
                               String serverName,
                               int serverPort,
                               String uri)
                        throws MalformedURLException
Description copied from class: AsyncProxyServlet
/** Resolve requested URL to the Proxied HttpURI

Overrides:
proxyHttpURI in class AsyncProxyServlet
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


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