M
- messagepublic class RedissonPatternTopic<M> extends Object implements RPatternTopic<M>
Modifier | Constructor and Description |
---|---|
protected |
RedissonPatternTopic(Codec codec,
CommandExecutor commandExecutor,
String name) |
protected |
RedissonPatternTopic(CommandExecutor commandExecutor,
String name) |
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 |
removeListener(int listenerId)
Removes the listener by
id for listening this topic |
protected RedissonPatternTopic(CommandExecutor commandExecutor, String name)
protected RedissonPatternTopic(Codec codec, CommandExecutor commandExecutor, String name)
public int addListener(PatternStatusListener listener)
RPatternTopic
addListener
in interface RPatternTopic<M>
StatusListener
public int addListener(PatternMessageListener<M> listener)
RPatternTopic
MessageListener.onMessage
is called when any message
is published on this topic.addListener
in interface RPatternTopic<M>
MessageListener
public void removeListener(int listenerId)
RPatternTopic
id
for listening this topicremoveListener
in interface RPatternTopic<M>
public List<String> getPatternNames()
RPatternTopic
getPatternNames
in interface RPatternTopic<M>
Copyright © 2014–2016. All rights reserved.