Package ch.rasc.wamp2spring.message
Class SubscribeMessage
java.lang.Object
ch.rasc.wamp2spring.message.WampMessage
ch.rasc.wamp2spring.message.SubscribeMessage
- All Implemented Interfaces:
org.springframework.messaging.Message<Object>
A Subscriber subscribes to a topic with this message.
[SUBSCRIBE, Request|id, Options|dict, Topic|uri]
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubscribeMessage(long requestId, String topic) SubscribeMessage(long requestId, String topic, boolean get_retained) SubscribeMessage(long requestId, String topic, MatchPolicy match) SubscribeMessage(long requestId, String topic, MatchPolicy match, boolean getRetained) SubscribeMessage(long requestId, String topic, MatchPolicy match, boolean getRetained, Map<String, Object> options) -
Method Summary
Modifier and TypeMethodDescriptionstatic SubscribeMessagedeserialize(com.fasterxml.jackson.core.JsonParser jp) Returns the matching policy for this subscription.Returns the Options dictionary.longReturns a random ID chosen by the Subscriber and used to correlate the Broker's response with the request.getTopic()Returns the topic the Subscriber wants to subscribe tobooleanReturns the get_retained flag.voidserialize(com.fasterxml.jackson.core.JsonGenerator generator) toString()Methods inherited from class ch.rasc.wamp2spring.message.WampMessage
deserialize, getCode, getHeader, getHeaders, getPayload, getPrincipal, getWampSessionId, getWebSocketSessionId, setHeader, setReceiver, setReceiverWebSocketSessionId
-
Field Details
-
CODE
public static final int CODE- See Also:
-
-
Constructor Details
-
SubscribeMessage
-
SubscribeMessage
-
SubscribeMessage
-
SubscribeMessage
-
SubscribeMessage
public SubscribeMessage(long requestId, String topic, MatchPolicy match, boolean getRetained, Map<String, Object> options)
-
-
Method Details
-
deserialize
public static SubscribeMessage deserialize(com.fasterxml.jackson.core.JsonParser jp) throws IOException - Throws:
IOException
-
serialize
- Specified by:
serializein classWampMessage- Throws:
IOException
-
getRequestId
public long getRequestId()Returns a random ID chosen by the Subscriber and used to correlate the Broker's response with the request. -
getMatchPolicy
Returns the matching policy for this subscription. -
getTopic
Returns the topic the Subscriber wants to subscribe to -
isGetRetained
public boolean isGetRetained()Returns the get_retained flag. If true the Broker sends back a retained event, when available. -
getOptions
Returns the Options dictionary. Third argument of a SUBSCRIBE message.[SUBSCRIBE, Request|id, Options|dict, Topic|uri]Returns a unmodifiable view of the map. Can be null.
-
toString
-