public interface RPatternTopic
Modifier and Type | Method and Description |
---|---|
<T> int |
addListener(Class<T> type,
PatternMessageListener<T> listener)
Subscribes to this topic.
|
int |
addListener(PatternStatusListener listener)
Subscribes to status changes of this topic
|
<T> RFuture<Integer> |
addListenerAsync(Class<T> type,
PatternMessageListener<T> listener) |
RFuture<Integer> |
addListenerAsync(PatternStatusListener listener) |
List<String> |
getPatternNames()
Get topic channel patterns
|
void |
removeAllListeners()
Removes all listeners from this topic
|
void |
removeListener(int listenerId)
Removes the listener by
id for listening this topic |
void |
removeListener(PatternMessageListener<?> listener)
Removes the listener by its instance
|
List<String> getPatternNames()
<T> int addListener(Class<T> type, PatternMessageListener<T> listener)
MessageListener.onMessage
is called when any message
is published on this topic.T
- type of messagetype
- - type of messagelistener
- - message listenerMessageListener
int addListener(PatternStatusListener listener)
listener
- - message listenerStatusListener
void removeListener(int listenerId)
id
for listening this topiclistenerId
- - id of message listenervoid removeListener(PatternMessageListener<?> listener)
listener
- - listener instancevoid removeAllListeners()
RFuture<Integer> addListenerAsync(PatternStatusListener listener)
<T> RFuture<Integer> addListenerAsync(Class<T> type, PatternMessageListener<T> listener)
Copyright © 2014–2019 The Redisson Project. All rights reserved.