Interface RPatternTopicReactive


  • public interface RPatternTopicReactive
    Reactive interface for Pattern based observer for Publish Subscribe object.
    Author:
    Nikita Koksharov
    • Method Detail

      • getPatternNames

        List<String> getPatternNames()
        Get topic channel patterns
        Returns:
        list of topic names
      • addListener

        <T> reactor.core.publisher.Mono<Integer> addListener​(Class<T> type,
                                                             PatternMessageListener<T> listener)
        Subscribes to this topic. MessageListener.onMessage is called when any message is published on this topic.
        Type Parameters:
        T - type of message
        Parameters:
        type - - type of message
        listener - - message listener
        Returns:
        local JVM unique listener id
        See Also:
        MessageListener
      • addListener

        reactor.core.publisher.Mono<Integer> addListener​(PatternStatusListener listener)
        Subscribes to status changes of this topic
        Parameters:
        listener - - message listener
        Returns:
        local JVM unique listener id
        See Also:
        StatusListener
      • removeListener

        reactor.core.publisher.Mono<Void> removeListener​(int listenerId)
        Removes the listener by id for listening this topic
        Parameters:
        listenerId - - message listener id