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,
String uriTemplate,
Object... uriVariables) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPhase() |
WebSocketSession |
getSession(String sessionId)
Return the
clientSession WebSocketSession. |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setAutoStartup(boolean autoStartup) |
void |
setHeaders(HttpHeaders headers) |
void |
setHeadersMap(Map<String,String> headers) |
void |
setOrigin(String origin) |
void |
setPhase(int phase) |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
addSupportedProtocols, closeSession, destroy, getSessions, getSubProtocols, setMessageListener, setSendBufferSizeLimit, setSendTimeLimit, setSupportedProtocolspublic ClientWebSocketContainer(WebSocketClient client, String uriTemplate, Object... uriVariables)
public void setOrigin(String origin)
public void setHeaders(HttpHeaders headers)
public WebSocketSession getSession(String sessionId)
clientSession WebSocketSession.
Independently of provided argument, this method always returns only the
established clientSessiongetSession in class IntegrationWebSocketContainersessionId - the sessionId. Can be null.clientSession, if established.public void setAutoStartup(boolean autoStartup)
public void setPhase(int phase)
public boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecycle