public abstract class IntegrationWebSocketContainer extends java.lang.Object implements DisposableBean
Provides the composition for the internal WebSocketHandler
implementation, which is used with native Web-Socket containers.
Collects established WebSocketSession
s, which can be accessed using
getSession(String)
.
Can accept the WebSocketListener
to delegate WebSocketSession
events
from the internal IntegrationWebSocketContainer.IntegrationWebSocketHandler
.
Supported sub-protocols can be configured, but SubProtocolCapable.getSubProtocols()
have a precedent.
WebSocketInboundChannelAdapter
,
WebSocketOutboundMessageHandler
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
protected java.util.Map<java.lang.String,WebSocketSession> |
sessions |
protected WebSocketHandler |
webSocketHandler |
Constructor and Description |
---|
IntegrationWebSocketContainer() |
Modifier and Type | Method and Description |
---|---|
void |
addSupportedProtocols(java.lang.String... protocols) |
void |
closeSession(WebSocketSession session,
CloseStatus closeStatus) |
void |
destroy() |
WebSocketSession |
getSession(java.lang.String sessionId) |
java.util.Map<java.lang.String,WebSocketSession> |
getSessions() |
java.util.List<java.lang.String> |
getSubProtocols() |
void |
setMessageListener(WebSocketListener messageListener) |
void |
setSendBufferSizeLimit(int sendBufferSizeLimit) |
void |
setSendTimeLimit(int sendTimeLimit) |
void |
setSupportedProtocols(java.lang.String... protocols) |
protected final org.apache.commons.logging.Log logger
protected final WebSocketHandler webSocketHandler
protected final java.util.Map<java.lang.String,WebSocketSession> sessions
public void setSendTimeLimit(int sendTimeLimit)
public void setSendBufferSizeLimit(int sendBufferSizeLimit)
public void setMessageListener(WebSocketListener messageListener)
public void setSupportedProtocols(java.lang.String... protocols)
public void addSupportedProtocols(java.lang.String... protocols)
public java.util.List<java.lang.String> getSubProtocols()
public java.util.Map<java.lang.String,WebSocketSession> getSessions()
public WebSocketSession getSession(java.lang.String sessionId)
public void closeSession(WebSocketSession session, CloseStatus closeStatus) throws java.lang.Exception
java.lang.Exception
public void destroy() throws java.lang.Exception
destroy
in interface DisposableBean
java.lang.Exception