public abstract class WampMessage extends Object implements org.springframework.messaging.Message<Object>
| Modifier and Type | Field and Description |
|---|---|
protected static Object |
EMPTY_OBJECT |
| Modifier and Type | Method and Description |
|---|---|
static <T extends WampMessage> |
fromJson(com.fasterxml.jackson.core.JsonFactory jsonFactory,
String json) |
static <T extends WampMessage> |
fromJson(com.fasterxml.jackson.core.JsonFactory jsonFactory,
String json,
WampSession wampSession) |
static <T extends WampMessage> |
fromJson(org.springframework.web.socket.WebSocketSession session,
com.fasterxml.jackson.core.JsonFactory jsonFactory,
String json) |
String |
getDestination() |
<T> T |
getHeader(WampMessageHeader header) |
org.springframework.messaging.MessageHeaders |
getHeaders() |
Object |
getPayload() |
Principal |
getPrincipal() |
WampMessageType |
getType() |
WampSession |
getWampSession() |
String |
getWebSocketSessionId()
Convenient method to retrieve the WebSocket session id.
|
protected String |
replacePrefix(String uri,
WampSession wampSession) |
void |
setDestinationTemplateVariables(Map<String,String> vars) |
void |
setHeader(WampMessageHeader header,
Object value) |
void |
setWebSocketSessionId(String webSocketSessionId) |
abstract String |
toJson(com.fasterxml.jackson.core.JsonFactory jsonFactory) |
protected static final Object EMPTY_OBJECT
public WampMessageType getType()
public void setHeader(WampMessageHeader header, Object value)
public <T> T getHeader(WampMessageHeader header)
public void setDestinationTemplateVariables(Map<String,String> vars)
public String getWebSocketSessionId()
public void setWebSocketSessionId(String webSocketSessionId)
public String getDestination()
public Principal getPrincipal()
public WampSession getWampSession()
public Object getPayload()
getPayload in interface org.springframework.messaging.Message<Object>public org.springframework.messaging.MessageHeaders getHeaders()
getHeaders in interface org.springframework.messaging.Message<Object>public static <T extends WampMessage> T fromJson(org.springframework.web.socket.WebSocketSession session, com.fasterxml.jackson.core.JsonFactory jsonFactory, String json) throws IOException
IOExceptionpublic abstract String toJson(com.fasterxml.jackson.core.JsonFactory jsonFactory) throws IOException
IOExceptionpublic static <T extends WampMessage> T fromJson(com.fasterxml.jackson.core.JsonFactory jsonFactory, String json) throws IOException
IOExceptionpublic static <T extends WampMessage> T fromJson(com.fasterxml.jackson.core.JsonFactory jsonFactory, String json, WampSession wampSession) throws IOException
IOExceptionprotected String replacePrefix(String uri, WampSession wampSession)
Copyright © 2014–2017. All rights reserved.