org.mortbay.proxy
Class AsyncProxyServlet
java.lang.Object
org.mortbay.proxy.AsyncProxyServlet
- All Implemented Interfaces:
- javax.servlet.Servlet
- Direct Known Subclasses:
- AsyncProxyServlet.Transparent
public class AsyncProxyServlet
- extends java.lang.Object
- implements javax.servlet.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.
Method Summary |
void |
destroy()
|
javax.servlet.ServletConfig |
getServletConfig()
|
java.lang.String |
getServletInfo()
|
void |
handleConnect(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
init(javax.servlet.ServletConfig config)
|
protected HttpURI |
proxyHttpURI(java.lang.String scheme,
java.lang.String serverName,
int serverPort,
java.lang.String uri)
/** Resolve requested URL to the Proxied HttpURI |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_DontProxyHeaders
protected java.util.HashSet<java.lang.String> _DontProxyHeaders
AsyncProxyServlet
public AsyncProxyServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Servlet
- Throws:
javax.servlet.ServletException
getServletConfig
public javax.servlet.ServletConfig getServletConfig()
- Specified by:
getServletConfig
in interface javax.servlet.Servlet
service
public void service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
service
in interface javax.servlet.Servlet
- Throws:
javax.servlet.ServletException
java.io.IOException
proxyHttpURI
protected HttpURI proxyHttpURI(java.lang.String scheme,
java.lang.String serverName,
int serverPort,
java.lang.String uri)
throws java.net.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:
java.net.MalformedURLException
handleConnect
public void handleConnect(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
getServletInfo
public java.lang.String getServletInfo()
- Specified by:
getServletInfo
in interface javax.servlet.Servlet
destroy
public void destroy()
- Specified by:
destroy
in interface javax.servlet.Servlet
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.