Package org.redisson.api
Interface RPatternTopicRx
-
public interface RPatternTopicRxRxJava2 interface for Pattern based observer for Publish Subscribe object.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> io.reactivex.rxjava3.core.Single<Integer>addListener(Class<T> type, PatternMessageListener<T> listener)Subscribes to this topic.io.reactivex.rxjava3.core.Single<Integer>addListener(PatternStatusListener listener)Subscribes to status changes of this topicList<String>getPatternNames()Get topic channel patternsvoidremoveListener(int listenerId)Removes the listener byidfor listening this topic
-
-
-
Method Detail
-
getPatternNames
List<String> getPatternNames()
Get topic channel patterns- Returns:
- list of topic names
-
addListener
<T> io.reactivex.rxjava3.core.Single<Integer> addListener(Class<T> type, PatternMessageListener<T> listener)
Subscribes to this topic.MessageListener.onMessageis called when any message is published on this topic.- Type Parameters:
T- type of message- Parameters:
type- - type of messagelistener- - message listener- Returns:
- local JVM unique listener id
- See Also:
MessageListener
-
addListener
io.reactivex.rxjava3.core.Single<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
void removeListener(int listenerId)
Removes the listener byidfor listening this topic- Parameters:
listenerId- - message listener id
-
-