public class StandardWebSocketClient extends AbstractWebSocketClient
logger| Constructor and Description |
|---|
StandardWebSocketClient()
Default constructor that calls
ContainerProvider.getWebSocketContainer() to
obtain a <code>WebSocketContainer</code> instance. |
StandardWebSocketClient(javax.websocket.WebSocketContainer webSocketContainer)
Constructor that accepts a pre-configured <code>WebSocketContainer</code> instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected WebSocketSession |
doHandshakeInternal(WebSocketHandler webSocketHandler,
org.springframework.http.HttpHeaders headers,
URI uri,
List<String> protocols,
Map<String,Object> handshakeAttributes)
Perform the actual handshake to establish a connection to the server.
|
doHandshake, doHandshakepublic StandardWebSocketClient()
ContainerProvider.getWebSocketContainer() to
obtain a <code>WebSocketContainer</code> instance.public StandardWebSocketClient(javax.websocket.WebSocketContainer webSocketContainer)
WebSocketContainerFactoryBean. In Java
configuration use ContainerProvider.getWebSocketContainer() to obtain
a container instance.protected WebSocketSession doHandshakeInternal(WebSocketHandler webSocketHandler, org.springframework.http.HttpHeaders headers, URI uri, List<String> protocols, Map<String,Object> handshakeAttributes) throws WebSocketConnectFailureException
AbstractWebSocketClientdoHandshakeInternal in class AbstractWebSocketClientwebSocketHandler - the client-side handler for WebSocket messagesheaders - HTTP headers to use for the handshake, with unwanted (forbidden)
headers filtered out, never nulluri - the target URI for the handshake, never nullprotocols - requested sub-protocols, or an empty listhandshakeAttributes - attributes to make available via
WebSocketSession.getHandshakeAttributes(); currently always an empty map.WebSocketConnectFailureException