Class TunnelClient
java.lang.Object
org.springframework.boot.devtools.tunnel.client.TunnelClient
- All Implemented Interfaces:
SmartInitializingSingleton
The client side component of a socket tunnel. Starts a
ServerSocket of the
specified port for local clients to connect to.- Since:
- 1.3.0
- Author:
- Phillip Webb, Andy Wilkinson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe main server thread. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(TunnelClientListener listener) voidprotected final TunnelClient.ServerThreadvoidremoveListener(TunnelClientListener listener) intstart()Start the client and accept incoming connections.voidstop()Stop the client, disconnecting any servers.
-
Constructor Details
-
TunnelClient
-
-
Method Details
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceSmartInitializingSingleton
-
start
Start the client and accept incoming connections.- Returns:
- the port on which the client is listening
- Throws:
IOException- in case of I/O errors
-
stop
Stop the client, disconnecting any servers.- Throws:
IOException- in case of I/O errors
-
getServerThread
-
addListener
-
removeListener
-