public class ReverseProxy extends java.lang.Object implements RunnableWhichThrows<java.io.IOException>, Stoppable
ReverseProxy.ProxyConnectionHandler.| Modifier and Type | Class and Description |
|---|---|
static interface |
ReverseProxy.ProxyConnectionHandler |
| Constructor and Description |
|---|
ReverseProxy(java.net.InetSocketAddress endpoint,
int backlog,
java.net.InetSocketAddress serverAddress,
java.net.Proxy serverConnectionProxy,
int serverConnectionTimeout,
ReverseProxy.ProxyConnectionHandler proxyConnectionHandler) |
| Modifier and Type | Method and Description |
|---|---|
java.net.InetSocketAddress |
getEndpointAddress() |
void |
run()
"To run" an instance means to call this method and wait until it returns.
|
void |
stop()
Returns when this
Stoppable has completely stopped. |
public ReverseProxy(java.net.InetSocketAddress endpoint,
int backlog,
java.net.InetSocketAddress serverAddress,
java.net.Proxy serverConnectionProxy,
int serverConnectionTimeout,
ReverseProxy.ProxyConnectionHandler proxyConnectionHandler)
throws java.io.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)java.io.IOExceptionpublic java.net.InetSocketAddress getEndpointAddress()
public void run()
throws java.io.IOException
RunnableWhichThrowsrun in interface RunnableWhichThrows<java.io.IOException>java.io.IOException