public final class HttpProxy extends Object implements de.unkrig.commons.lang.protocol.RunnableWhichThrows<IOException>, de.unkrig.commons.lang.protocol.Stoppable
Constructor and Description |
---|
HttpProxy(InetSocketAddress endpoint,
InetSocketAddress remoteAddress) |
HttpProxy(InetSocketAddress endpoint,
InetSocketAddress remoteAddress,
de.unkrig.commons.lang.protocol.TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer,
de.unkrig.commons.lang.protocol.TransformerWhichThrows<? super HttpResponse,HttpResponse,IOException> responseTransformer) |
HttpProxy(InetSocketAddress endpoint,
String remoteHost,
int remotePort) |
HttpProxy(InetSocketAddress endpoint,
String remoteHost,
int remotePort,
de.unkrig.commons.lang.protocol.TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer,
de.unkrig.commons.lang.protocol.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 toIOException
public 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 serverIOException
public HttpProxy(InetSocketAddress endpoint, InetSocketAddress remoteAddress, de.unkrig.commons.lang.protocol.TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer, de.unkrig.commons.lang.protocol.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 clientIOException
public HttpProxy(InetSocketAddress endpoint, String remoteHost, int remotePort, de.unkrig.commons.lang.protocol.TransformerWhichThrows<? super HttpRequest,HttpRequest,IOException> requestTransformer, de.unkrig.commons.lang.protocol.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 clientIOException
public void run() throws IOException
run
in interface de.unkrig.commons.lang.protocol.RunnableWhichThrows<IOException>
IOException
public void stop()
stop
in interface de.unkrig.commons.lang.protocol.Stoppable
public InetSocketAddress getEndpointAddress()
Copyright © 2018 Arno Unkrig. All rights reserved.