Class TopicSubscription


  • class TopicSubscription
    extends Object
    The TopicSubscription class holds the parameters of a proxy's subscription to a topic.
    • Field Detail

      • subs

        private Map<String,​String> subs
        Table of subscriptions selectors.
      • lastSelector

        private String lastSelector
        Last built selector.
    • Constructor Detail

      • TopicSubscription

        TopicSubscription()
        Creates a TopicSubscription instance.
    • Method Detail

      • putSubscription

        void putSubscription​(String name,
                             String selector)
        Adds a new subscription or updates an existing one.
        Parameters:
        name - Subscription name.
        selector - Selector.
      • removeSubscription

        void removeSubscription​(String name)
        Removes a subscription.
        Parameters:
        name - Subscription name.
      • isEmpty

        boolean isEmpty()
        Returns true if the subscriptions table is empty.
      • buildSelector

        String buildSelector()
        Returns a selector built from the subscriptions' selectors.
      • setLastSelector

        void setLastSelector​(String selector)
        Sets the last selector value.
      • getLastSelector

        String getLastSelector()
        Returns the last selector value.
      • getNames

        Iterator<String> getNames()
        Returns the names of the subscriptions.
      • size

        int size()
        Returns the number of subscriptions.