public class WebSocketConnectionManager extends ConnectionManagerSupport
WebSocketClient, and a
WebSocketHandler, connects to a WebSocket server through ConnectionManagerSupport.start() and
ConnectionManagerSupport.stop() methods. If ConnectionManagerSupport.setAutoStartup(boolean) is set to true
this will be done automatically when the Spring ApplicationContext is refreshed.logger| Constructor and Description |
|---|
WebSocketConnectionManager(WebSocketClient client,
WebSocketHandler webSocketHandler,
String uriTemplate,
Object... uriVariables) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeConnection() |
protected WebSocketHandler |
decorateWebSocketHandler(WebSocketHandler handler)
Decorate the WebSocketHandler provided to the class constructor.
|
List<String> |
getSubProtocols() |
protected boolean |
isConnected() |
protected void |
openConnection() |
void |
setSubProtocols(List<String> subProtocols) |
void |
startInternal() |
void |
stopInternal() |
getPhase, getUri, isAutoStartup, isRunning, setAutoStartup, setPhase, start, stop, stoppublic WebSocketConnectionManager(WebSocketClient client, WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables)
protected WebSocketHandler decorateWebSocketHandler(WebSocketHandler handler)
By default LoggingWebSocketHandlerDecorator is added.
public void startInternal()
startInternal in class ConnectionManagerSupportpublic void stopInternal()
throws Exception
stopInternal in class ConnectionManagerSupportExceptionprotected void openConnection()
throws Exception
openConnection in class ConnectionManagerSupportExceptionprotected void closeConnection()
throws Exception
closeConnection in class ConnectionManagerSupportExceptionprotected boolean isConnected()
isConnected in class ConnectionManagerSupport