类 TunnelClient
- java.lang.Object
- org.springframework.boot.devtools.tunnel.client.TunnelClient
- 所有已实现的接口:
org.springframework.beans.factory.SmartInitializingSingleton
public class TunnelClient extends Object implements org.springframework.beans.factory.SmartInitializingSingleton
The client side component of a socket tunnel. Starts aServerSocket
of the specified port for local clients to connect to.- 从以下版本开始:
- 1.3.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected class
TunnelClient.ServerThread
The main server thread.
构造器概要
构造器 构造器 说明 TunnelClient(int listenPort, TunnelConnection tunnelConnection)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addListener(TunnelClientListener listener)
void
afterSingletonsInstantiated()
protected TunnelClient.ServerThread
getServerThread()
void
removeListener(TunnelClientListener listener)
void
start()
Start the client and accept incoming connections on the port.void
stop()
Stop the client, disconnecting any servers.
构造器详细资料
TunnelClient
public TunnelClient(int listenPort, TunnelConnection tunnelConnection)
方法详细资料
afterSingletonsInstantiated
public void afterSingletonsInstantiated()
- 指定者:
afterSingletonsInstantiated
在接口中org.springframework.beans.factory.SmartInitializingSingleton
start
public void start() throws IOException
Start the client and accept incoming connections on the port.- 抛出:
IOException
- in case of I/O errors
stop
public void stop() throws IOException
Stop the client, disconnecting any servers.- 抛出:
IOException
- in case of I/O errors
getServerThread
protected final TunnelClient.ServerThread getServerThread()
addListener
public void addListener(TunnelClientListener listener)
removeListener
public void removeListener(TunnelClientListener listener)