public final class ClientWebSocketContainer extends IntegrationWebSocketContainer implements SmartLifecycle
IntegrationWebSocketContainer
implementation for the client
Web-Socket connection.
Represent the composition over an internal ConnectionManagerSupport
implementation.
Accepts the clientSession
WebSocketSession
on
ClientWebSocketContainer.IntegrationWebSocketConnectionManager.openConnection()
event, which can be accessed from this container using getSession(String)
.
logger, sessions, webSocketHandler
Constructor and Description |
---|
ClientWebSocketContainer(WebSocketClient client,
java.lang.String uriTemplate,
java.lang.Object... uriVariables) |
Modifier and Type | Method and Description |
---|---|
int |
getPhase() |
WebSocketSession |
getSession(java.lang.String sessionId)
Return the
clientSession WebSocketSession . |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setAutoStartup(boolean autoStartup) |
void |
setHeaders(HttpHeaders headers) |
void |
setHeadersMap(java.util.Map<java.lang.String,java.lang.String> headers) |
void |
setOrigin(java.lang.String origin) |
void |
setPhase(int phase) |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
addSupportedProtocols, closeSession, destroy, getSessions, getSubProtocols, setMessageListener, setSendBufferSizeLimit, setSendTimeLimit, setSupportedProtocols
public ClientWebSocketContainer(WebSocketClient client, java.lang.String uriTemplate, java.lang.Object... uriVariables)
public void setOrigin(java.lang.String origin)
public void setHeadersMap(java.util.Map<java.lang.String,java.lang.String> headers)
public void setHeaders(HttpHeaders headers)
public WebSocketSession getSession(java.lang.String sessionId)
clientSession
WebSocketSession
.
Independently of provided argument, this method always returns only the
established clientSession
getSession
in class IntegrationWebSocketContainer
sessionId
- the sessionId
. Can be null
.clientSession
, if established.public void setAutoStartup(boolean autoStartup)
public void setPhase(int phase)
public boolean isAutoStartup()
isAutoStartup
in interface SmartLifecycle
public void stop(java.lang.Runnable callback)
stop
in interface SmartLifecycle