Class SubscribeMessage

java.lang.Object
ch.rasc.wamp2spring.message.WampMessage
ch.rasc.wamp2spring.message.SubscribeMessage
All Implemented Interfaces:
org.springframework.messaging.Message<Object>

public class SubscribeMessage extends WampMessage
A Subscriber subscribes to a topic with this message. [SUBSCRIBE, Request|id, Options|dict, Topic|uri]
  • Field Details

  • Constructor Details

    • SubscribeMessage

      public SubscribeMessage(long requestId, String topic)
    • SubscribeMessage

      public SubscribeMessage(long requestId, String topic, boolean get_retained)
    • SubscribeMessage

      public SubscribeMessage(long requestId, String topic, MatchPolicy match)
    • SubscribeMessage

      public SubscribeMessage(long requestId, String topic, MatchPolicy match, boolean getRetained)
    • 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

      public void serialize(com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
      Specified by:
      serialize in class WampMessage
      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

      public MatchPolicy getMatchPolicy()
      Returns the matching policy for this subscription.
    • getTopic

      public String 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

      public Map<String,Object> 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

      public String toString()
      Overrides:
      toString in class Object