public final class HttpProxy extends Object implements RunnableWhichThrows<IOException>, Stoppable
| Constructor and Description |
|---|
HttpProxy(InetSocketAddress endpoint,
InetSocketAddress remoteAddress) |
HttpProxy(InetSocketAddress endpoint,
InetSocketAddress remoteAddress,
TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer,
TransformerWhichThrows<? super HttpResponse,HttpResponse,IOException> responseTransformer) |
HttpProxy(InetSocketAddress endpoint,
String remoteHost,
int remotePort) |
HttpProxy(InetSocketAddress endpoint,
String remoteHost,
int remotePort,
TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer,
TransformerWhichThrows<? super HttpResponse,HttpResponse,IOException> responseTransformer) |
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
getEndpointAddress() |
void |
run() |
void |
stop() |
public HttpProxy(InetSocketAddress endpoint, InetSocketAddress remoteAddress) throws IOException
endpoint - The local endpoint (interface) to bind toremoteAddress - The address of the remote server to connect toIOExceptionpublic HttpProxy(InetSocketAddress endpoint, String remoteHost, int remotePort) throws IOException
endpoint - The local endpoint (interface) to bind toremoteHost - The name of the remote server to connect toremotePort - The port on the remote serverIOExceptionpublic HttpProxy(InetSocketAddress endpoint, InetSocketAddress remoteAddress, TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer, TransformerWhichThrows<? super HttpResponse,HttpResponse,IOException> responseTransformer) throws IOException
endpoint - The local endpoint (interface) to bind toremoteAddress - The address of the remote server to connect torequestTransformer - Could modify requests as they are forwarded from the client to the serverresponseTransformer - Could modify responses as they are forwarded from the server to the clientIOExceptionpublic HttpProxy(InetSocketAddress endpoint, String remoteHost, int remotePort, TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer, TransformerWhichThrows<? super HttpResponse,HttpResponse,IOException> responseTransformer) throws IOException
endpoint - The local endpoint (interface) to bind toremoteHost - The name of the remote server to connect toremotePort - The port on the remote serverrequestTransformer - Could modify requests as they are forwarded from the client to the serverresponseTransformer - Could modify responses as they are forwarded from the server to the clientIOExceptionpublic void run()
throws IOException
run in interface RunnableWhichThrows<IOException>IOExceptionpublic InetSocketAddress getEndpointAddress()
Copyright © 2016 Arno Unkrig. All rights reserved.