connection manager that connects
to the server via WebSocketClient and handles the session with a
WebSocketHandler.
| Modifier and Type | Field and Description |
|---|---|
| private final WebSocketClient | |
| private final WebSocketHttpHeaders | |
| private final WebSocketHandler | |
| private WebSocketSession |
| Access | Constructor and Description |
|---|---|
| public | WebSocketConnectionManager(WebSocketClient client, WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables)
Constructor with the client to use and a handler to handle messages with. |
| public | WebSocketConnectionManager(WebSocketClient client, WebSocketHandler webSocketHandler, URI uri)
Variant of |
| Modifier and Type | Method and Description |
|---|---|
| protected void | closeConnection()
Implements abstract org. Subclasses implement this to close the connection. |
| protected WebSocketHandler | decorateWebSocketHandler(WebSocketHandler handler)
Decorate the WebSocketHandler provided to the class constructor. |
| public HttpHeaders | |
| public String | |
| public List | |
| public boolean | isConnected()
Implements abstract org. Whether the connection is open/ |
| protected void | openConnection()
Implements abstract org. Subclasses implement this to actually establish the connection. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| client | back to summary |
|---|---|
| private final WebSocketClient client | |
| headers | back to summary |
|---|---|
| private final WebSocketHttpHeaders headers | |
| webSocketHandler | back to summary |
|---|---|
| private final WebSocketHandler webSocketHandler | |
| webSocketSession | back to summary |
|---|---|
| private WebSocketSession webSocketSession
| |
| WebSocketConnectionManager | back to summary |
|---|---|
| public WebSocketConnectionManager(WebSocketClient client, WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) Constructor with the client to use and a handler to handle messages with. | |
| WebSocketConnectionManager | back to summary |
|---|---|
| public WebSocketConnectionManager(WebSocketClient client, WebSocketHandler webSocketHandler, URI uri) Variant of
| |
| closeConnection | back to summary |
|---|---|
| protected void closeConnection() throws Exception Implements abstract org. Doc from org. Subclasses implement this to close the connection.
| |
| decorateWebSocketHandler | back to summary |
|---|---|
| protected WebSocketHandler decorateWebSocketHandler(WebSocketHandler handler) Decorate the WebSocketHandler provided to the class constructor. By default | |
| getHeaders | back to summary |
|---|---|
| public HttpHeaders getHeaders() Return the default headers for the WebSocket handshake request. | |
| getOrigin | back to summary |
|---|---|
| public String getOrigin() Return the configured origin.
| |
| getSubProtocols | back to summary |
|---|---|
| public List Return the configured sub-protocols to use. | |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Implements abstract org. Doc from org. Whether the connection is open/
| |
| openConnection | back to summary |
|---|---|
| protected void openConnection() Implements abstract org. Doc from org. Subclasses implement this to actually establish the connection.
| |
| setHeaders | back to summary |
|---|---|
| public void setHeaders(HttpHeaders headers) Provide default headers to add to the WebSocket handshake request. | |
| setOrigin | back to summary |
|---|---|
| public void setOrigin(String origin) Set the origin to use. | |
| setSubProtocols | back to summary |
|---|---|
| public void setSubProtocols(List<String> protocols) Set the sub-protocols to use. If configured, specified sub-protocols will be
requested in the handshake through the | |
| startInternal | back to summary |
|---|---|
| public void startInternal() Overrides org.
| |
| stopInternal | back to summary |
|---|---|
| public void stopInternal() throws Exception Overrides org.
| |