public interface RedisPubSubCommands
| Modifier and Type | Method and Description |
|---|---|
Subscription |
getSubscription()
Returns the current subscription for this connection or null if the connection is not subscribed.
|
boolean |
isSubscribed()
Indicates whether the current connection is subscribed (to at least one channel) or not.
|
void |
pSubscribe(MessageListener listener,
byte[]... patterns)
Subscribes the connection to all channels matching the given patterns.
|
Long |
publish(byte[] channel,
byte[] message)
Publishes the given message to the given channel.
|
void |
subscribe(MessageListener listener,
byte[]... channels)
Subscribes the connection to the given channels.
|
boolean isSubscribed()
Subscription getSubscription()
Long publish(byte[] channel, byte[] message)
channel - the channel to publish tomessage - message to publishvoid subscribe(MessageListener listener, byte[]... channels)
listener - message listenerchannels - channel namesvoid pSubscribe(MessageListener listener, byte[]... patterns)
listener - message listenerpatterns - channel name patterns