Interface TopicSubscription

  • All Known Subinterfaces:
    DurableTopicSubscription

    public interface TopicSubscription
    NCache provides ITopicSubscription interface which is returned against the desired topic,containing information for topic subscriptions.
    • Method Detail

      • getTopic

        Topic getTopic()
        Retrieves Topic instance containing information about the topic.
        Returns:
        Topic instance of the topic.
      • addMessageReceivedListener

        void addMessageReceivedListener​(MessageReceivedListener messageReceivedListener)
                                 throws CacheException
        Event to register subscriber against the topic so that it can receive the published messages.
        Parameters:
        messageReceivedListener - The listener that is invoked whenever a message is received.
        Throws:
        CacheException
      • removeMessageReceivedListener

        void removeMessageReceivedListener​(MessageReceivedListener messageReceivedListener)
                                    throws CacheException
        Unregisters the user for message received event.
        Parameters:
        messageReceivedListener - The instance of the registerd message received listener.
        Throws:
        CacheException
      • unSubscribe

        void unSubscribe()
                  throws java.lang.Exception
        Unsubscribes the subscription to this topic.
        Throws:
        java.lang.Exception