类 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 aServerSocketof the specified port for local clients to connect to.- 从以下版本开始:
- 1.3.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected classTunnelClient.ServerThreadThe main server thread.
构造器概要
构造器 构造器 说明 TunnelClient(int listenPort, TunnelConnection tunnelConnection)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddListener(TunnelClientListener listener)voidafterSingletonsInstantiated()protected TunnelClient.ServerThreadgetServerThread()voidremoveListener(TunnelClientListener listener)intstart()Start the client and accept incoming connections.voidstop()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 int start() throws IOException
Start the client and accept incoming connections.- 返回:
- the port on which the client is listening
- 抛出:
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)