M
- the type of message objectpublic interface RPatternTopic<M>
Modifier and Type | Method and Description |
---|---|
int |
addListener(PatternMessageListener<M> listener)
Subscribes to this topic.
|
int |
addListener(PatternStatusListener listener)
Subscribes to status changes of this topic
|
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<M> listener)
Removes the listener by its instance
|
List<String> getPatternNames()
int addListener(PatternMessageListener<M> listener)
MessageListener.onMessage
is called when any message
is published on this topic.listener
- - message listenerMessageListener
int addListener(PatternStatusListener listener)
listener
- - message listenerStatusListener
void removeListener(int listenerId)
id
for listening this topiclistenerId
- - id of message listenervoid removeListener(PatternMessageListener<M> listener)
listener
- - listener instancevoid removeAllListeners()
Copyright © 2014–2017 The Redisson Project. All rights reserved.