public abstract class IntegrationWebSocketContainer extends Object implements org.springframework.beans.factory.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 Map<String,org.springframework.web.socket.WebSocketSession> |
sessions |
protected org.springframework.web.socket.WebSocketHandler |
webSocketHandler |
Constructor and Description |
---|
IntegrationWebSocketContainer() |
Modifier and Type | Method and Description |
---|---|
void |
addSupportedProtocols(String... protocols) |
void |
closeSession(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus closeStatus) |
void |
destroy() |
org.springframework.web.socket.WebSocketSession |
getSession(String sessionId) |
Map<String,org.springframework.web.socket.WebSocketSession> |
getSessions() |
List<String> |
getSubProtocols() |
void |
setMessageListener(WebSocketListener messageListener) |
void |
setSendBufferSizeLimit(int sendBufferSizeLimit) |
void |
setSendTimeLimit(int sendTimeLimit) |
void |
setSupportedProtocols(String... protocols) |
protected final org.apache.commons.logging.Log logger
protected final org.springframework.web.socket.WebSocketHandler webSocketHandler
public void setSendTimeLimit(int sendTimeLimit)
public void setSendBufferSizeLimit(int sendBufferSizeLimit)
public void setMessageListener(WebSocketListener messageListener)
public void setSupportedProtocols(String... protocols)
public void addSupportedProtocols(String... protocols)
public org.springframework.web.socket.WebSocketSession getSession(String sessionId)
public void closeSession(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus closeStatus) throws Exception
Exception