public abstract class AbstractWebSocketClient extends Object implements WebSocketClient
WebSocketClient
implementations.Constructor and Description |
---|
AbstractWebSocketClient() |
Modifier and Type | Method and Description |
---|---|
ListenableFuture<WebSocketSession> |
doHandshake(WebSocketHandler webSocketHandler,
String uriTemplate,
Object... uriVars) |
ListenableFuture<WebSocketSession> |
doHandshake(WebSocketHandler webSocketHandler,
WebSocketHttpHeaders headers,
URI uri) |
protected abstract ListenableFuture<WebSocketSession> |
doHandshakeInternal(WebSocketHandler webSocketHandler,
HttpHeaders headers,
URI uri,
List<String> subProtocols,
List<WebSocketExtension> extensions,
Map<String,Object> handshakeAttributes)
Perform the actual handshake to establish a connection to the server.
|
protected final Log logger
public ListenableFuture<WebSocketSession> doHandshake(WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVars)
doHandshake
in interface WebSocketClient
public final ListenableFuture<WebSocketSession> doHandshake(WebSocketHandler webSocketHandler, WebSocketHttpHeaders headers, URI uri)
doHandshake
in interface WebSocketClient
protected abstract ListenableFuture<WebSocketSession> doHandshakeInternal(WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> subProtocols, List<WebSocketExtension> extensions, Map<String,Object> handshakeAttributes)
webSocketHandler
- the client-side handler for WebSocket messagesheaders
- HTTP headers to use for the handshake, with unwanted (forbidden)
headers filtered out, never null
uri
- the target URI for the handshake, never null
subProtocols
- requested sub-protocols, or an empty listextensions
- requested WebSocket extensions, or an empty listhandshakeAttributes
- attributes to make available via
WebSocketSession.getHandshakeAttributes()
; currently always an empty map.