public class ReverseProxy extends Object implements de.unkrig.commons.lang.protocol.RunnableWhichThrows<IOException>, de.unkrig.commons.lang.protocol.Stoppable
ReverseProxy.ProxyConnectionHandler
.Modifier and Type | Class and Description |
---|---|
static interface |
ReverseProxy.ProxyConnectionHandler |
Constructor and Description |
---|
ReverseProxy(InetSocketAddress endpoint,
int backlog,
InetSocketAddress serverAddress,
Proxy serverConnectionProxy,
int serverConnectionTimeout,
ReverseProxy.ProxyConnectionHandler proxyConnectionHandler) |
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getEndpointAddress() |
void |
run() |
void |
stop() |
public ReverseProxy(InetSocketAddress endpoint, int backlog, InetSocketAddress serverAddress, Proxy serverConnectionProxy, int serverConnectionTimeout, ReverseProxy.ProxyConnectionHandler proxyConnectionHandler) throws IOException
endpoint
- The local TCP port (see ServerSocket.ServerSocket(int)
and the local
interface this reverse proxy will bind to, see ServerSocket.ServerSocket(int, int, InetAddress)
backlog
- The listen backlog (see ServerSocket.ServerSocket(int, int)
serverAddress
- Address of the remote server to connect toserverConnectionProxy
- Used to create connections to the remote server; see Socket.Socket(Proxy)
serverConnectionTimeout
- See Socket.connect(java.net.SocketAddress, int)
IOException
public InetSocketAddress getEndpointAddress()
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
Copyright © 2018 Arno Unkrig. All rights reserved.