org.tuckey.web.filters.urlrewrite
Class RequestProxy
java.lang.Object
org.tuckey.web.filters.urlrewrite.RequestProxy
public class RequestProxy
- extends Object
This class is responsible for a proxy http request.
It takes the incoming request and then it creates a new request to the target address and copies the response of that proxy request
to the response of the original request.
This class uses the commons-httpclient classes from Apache.
User: Joachim Ansorg,
Date: 19.06.2008
Time: 16:02:54
|
Method Summary |
static void |
copyStream(InputStream in,
OutputStream out)
|
static void |
execute(String target,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse)
This method performs the proxying of the request to the target address. |
static org.apache.commons.httpclient.ProxyHost |
getUseProxyServer(String useProxyServer)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestProxy
public RequestProxy()
execute
public static void execute(String target,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse)
throws IOException
- This method performs the proxying of the request to the target address.
- Parameters:
target - The target address. Has to be a fully qualified address. The request is send as-is to this address.hsRequest - The request data which should be send to thehsResponse - The response data which will contain the data returned by the proxied request to target.
- Throws:
IOException - Passed on from the connection logic.
copyStream
public static void copyStream(InputStream in,
OutputStream out)
throws IOException
- Throws:
IOException
getUseProxyServer
public static org.apache.commons.httpclient.ProxyHost getUseProxyServer(String useProxyServer)
Copyright © 2001-2012 Paul Tuckey. All Rights Reserved.