public abstract class AbstractWebSocketClient extends java.lang.Object implements WebSocketClient
WebSocketClient
implementations.Constructor and Description |
---|
AbstractWebSocketClient() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertUri(java.net.URI uri) |
ListenableFuture<WebSocketSession> |
doHandshake(WebSocketHandler webSocketHandler,
java.lang.String uriTemplate,
java.lang.Object... uriVars) |
ListenableFuture<WebSocketSession> |
doHandshake(WebSocketHandler webSocketHandler,
WebSocketHttpHeaders headers,
java.net.URI uri) |
protected abstract ListenableFuture<WebSocketSession> |
doHandshakeInternal(WebSocketHandler webSocketHandler,
HttpHeaders headers,
java.net.URI uri,
java.util.List<java.lang.String> subProtocols,
java.util.List<WebSocketExtension> extensions,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Perform the actual handshake to establish a connection to the server.
|
protected final Log logger
public ListenableFuture<WebSocketSession> doHandshake(WebSocketHandler webSocketHandler, java.lang.String uriTemplate, java.lang.Object... uriVars)
doHandshake
in interface WebSocketClient
public final ListenableFuture<WebSocketSession> doHandshake(WebSocketHandler webSocketHandler, @Nullable WebSocketHttpHeaders headers, java.net.URI uri)
doHandshake
in interface WebSocketClient
protected void assertUri(java.net.URI uri)
protected abstract ListenableFuture<WebSocketSession> doHandshakeInternal(WebSocketHandler webSocketHandler, HttpHeaders headers, java.net.URI uri, java.util.List<java.lang.String> subProtocols, java.util.List<WebSocketExtension> extensions, java.util.Map<java.lang.String,java.lang.Object> attributes)
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 listattributes
- attributes to associate with the WebSocketSession, i.e. via
WebSocketSession.getAttributes()
; currently always an empty map.