public class WampSubProtocolHandler extends Object implements org.springframework.web.socket.messaging.SubProtocolHandler, org.springframework.context.ApplicationEventPublisherAware
SubProtocolHandler implementation for the WAMP v2 protocol.| Modifier and Type | Field and Description |
|---|---|
static String |
CBOR_PROTOCOL |
static String |
JSON_PROTOCOL |
static String |
MSGPACK_PROTOCOL |
static String |
SMILE_PROTOCOL |
| Constructor and Description |
|---|
WampSubProtocolHandler(com.fasterxml.jackson.core.JsonFactory jsonFactory,
com.fasterxml.jackson.core.JsonFactory msgpackFactory,
com.fasterxml.jackson.core.JsonFactory cborFactory,
com.fasterxml.jackson.core.JsonFactory smileFactory,
org.springframework.messaging.MessageChannel clientInboundChannel,
Features features) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSessionEnded(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus closeStatus,
org.springframework.messaging.MessageChannel outputChannel) |
void |
afterSessionStarted(org.springframework.web.socket.WebSocketSession session,
org.springframework.messaging.MessageChannel outputChannel) |
List<String> |
getSupportedProtocols() |
void |
handleMessageFromClient(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.WebSocketMessage<?> webSocketMessage,
org.springframework.messaging.MessageChannel outputChannel)
Handle incoming WebSocket messages from clients.
|
void |
handleMessageToClient(org.springframework.web.socket.WebSocketSession session,
org.springframework.messaging.Message<?> message)
Handle WAMP messages going back out to WebSocket clients.
|
String |
resolveSessionId(org.springframework.messaging.Message<?> message) |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
String |
toString() |
public static final String JSON_PROTOCOL
public static final String MSGPACK_PROTOCOL
public static final String CBOR_PROTOCOL
public static final String SMILE_PROTOCOL
public WampSubProtocolHandler(com.fasterxml.jackson.core.JsonFactory jsonFactory,
com.fasterxml.jackson.core.JsonFactory msgpackFactory,
com.fasterxml.jackson.core.JsonFactory cborFactory,
com.fasterxml.jackson.core.JsonFactory smileFactory,
org.springframework.messaging.MessageChannel clientInboundChannel,
Features features)
public List<String> getSupportedProtocols()
getSupportedProtocols in interface org.springframework.web.socket.messaging.SubProtocolHandlerpublic void handleMessageFromClient(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.WebSocketMessage<?> webSocketMessage,
org.springframework.messaging.MessageChannel outputChannel)
handleMessageFromClient in interface org.springframework.web.socket.messaging.SubProtocolHandlerpublic void handleMessageToClient(org.springframework.web.socket.WebSocketSession session,
org.springframework.messaging.Message<?> message)
handleMessageToClient in interface org.springframework.web.socket.messaging.SubProtocolHandlerpublic String resolveSessionId(org.springframework.messaging.Message<?> message)
resolveSessionId in interface org.springframework.web.socket.messaging.SubProtocolHandlerpublic void afterSessionStarted(org.springframework.web.socket.WebSocketSession session,
org.springframework.messaging.MessageChannel outputChannel)
afterSessionStarted in interface org.springframework.web.socket.messaging.SubProtocolHandlerpublic void afterSessionEnded(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus closeStatus,
org.springframework.messaging.MessageChannel outputChannel)
afterSessionEnded in interface org.springframework.web.socket.messaging.SubProtocolHandlerpublic void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwareCopyright © 2017–2018. All rights reserved.