Class BrokerSubscription


  • public class BrokerSubscription
    extends java.lang.Object
    This class is a data structure used to describe a subscription.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String event_type_name
      The event type name.
      java.lang.String filter
      The filter string.
      int sub_id
      The subscription id for this subscription.
    • Constructor Summary

      Constructors 
      Constructor Description
      BrokerSubscription()
      Create an empty subscription object
      BrokerSubscription​(int id, java.lang.String type_name, java.lang.String filter_string)
      Create a subscription object setting all three parameters, sub_id, event_type_name, and filter.
      BrokerSubscription​(java.lang.String type_name, java.lang.String filter_string)
      Create a subscription object with event_type_name and filter set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()
      Convert to string.
      java.lang.String toString​(int indent_level)
      Convert to string.
      java.lang.String toString​(int indent_level, boolean include_sub_id)
      Convert to string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • sub_id

        public int sub_id
        The subscription id for this subscription. Must be a non-negative number.
      • event_type_name

        public java.lang.String event_type_name
        The event type name.
      • filter

        public java.lang.String filter
        The filter string. For example "
         cost < 300.00
         
        " or "
         (total >= 300.00) and (state = "CA")
         
        "
    • Constructor Detail

      • BrokerSubscription

        public BrokerSubscription()
        Create an empty subscription object
      • BrokerSubscription

        public BrokerSubscription​(java.lang.String type_name,
                                  java.lang.String filter_string)
        Create a subscription object with event_type_name and filter set. sub_id is set to zero.
      • BrokerSubscription

        public BrokerSubscription​(int id,
                                  java.lang.String type_name,
                                  java.lang.String filter_string)
        Create a subscription object setting all three parameters, sub_id, event_type_name, and filter.
    • Method Detail

      • toString

        public java.lang.String toString()
        Convert to string.
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(int indent_level)
        Convert to string. The "indent_level" is the number of 4-space indents that the output should be generated for.
      • toString

        public java.lang.String toString​(int indent_level,
                                         boolean include_sub_id)
        Convert to string. The "indent_level" is the number of 4-space indents that the output should be generated for. If include_sub_id is false, the subscription's id will not be included in the output.