com.atlassian.tunnel.tunnel.client
Class Tunnel
java.lang.Object
com.atlassian.tunnel.tunnel.client.Tunnel
- All Implemented Interfaces:
- Runnable
public class Tunnel
- extends Object
- implements Runnable
- Author:
- rinaldo, jayd, Forked by Atlassian
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Tunnel
public Tunnel(int remoteProxyPort,
@NotNull
TunnelServerAddressProvider tunnelAddressProvider,
@NotNull
String destinationHost,
int destinationPort,
@Nullable
TunnelStatusTracker statusTracker,
@NotNull
SocketFactory tunnelSocketFactory,
@NotNull
SocketFactory forwardingSocketFactory)
- Parameters:
remoteProxyPort - The TCP port number on the tunnel server which is to serve as the proxy for the
final destinationtunnelHost - The IP address or host name of the tunnel servertunnelPort - The TCP port number at which the tunnel server is accepting tunnel connectionsdestinationHost - The IP address or host name of the destination for the tunnelled trafficdestinationPort - The TCP port number of the destination for the tunnelled trafficstatusTracker - retry handler used to handle tunnel failures (and successes)tunnelSocketFactory - The SocketFactory for creation of connections to the tunnel server. This
will probably be a ServerSocketFactory.forwardingSocketFactory - The SocketFactory for creation of connections to the destination.
open
public Thread open()
close
public void close()
run
public void run()
- Open a Server socket on LocalPort and wait for a client connection.
When client socket established, complete the connection to the remote
service via call to getRemoteSocket().
- Specified by:
run in interface Runnable
closeAllTunnels
public void closeAllTunnels(String previousAddressStr)
Copyright © 2015 Atlassian. All rights reserved.