public class TunnelClient extends Object implements SmartInitializingSingleton
ServerSocket
of the
specified port for local clients to connect to.Modifier and Type | Class and Description |
---|---|
protected class |
TunnelClient.ServerThread
The main server thread.
|
Constructor and Description |
---|
TunnelClient(int listenPort,
TunnelConnection tunnelConnection) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(TunnelClientListener listener) |
void |
afterSingletonsInstantiated() |
protected TunnelClient.ServerThread |
getServerThread() |
void |
removeListener(TunnelClientListener listener) |
int |
start()
Start the client and accept incoming connections.
|
void |
stop()
Stop the client, disconnecting any servers.
|
public TunnelClient(int listenPort, TunnelConnection tunnelConnection)
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface SmartInitializingSingleton
public int start() throws IOException
IOException
- in case of I/O errorspublic void stop() throws IOException
IOException
- in case of I/O errorsprotected final TunnelClient.ServerThread getServerThread()
public void addListener(TunnelClientListener listener)
public void removeListener(TunnelClientListener listener)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.