Interface RedisSubscriptionListener
- All Known Implementing Classes:
RedisSubscriptionAdapter, RedisSubscriptionDebugListener
public interface RedisSubscriptionListener
A listener class that listens on fired events from a Redis channel subscription.
- Author:
- Matthew Tropiano
-
Method Summary
Modifier and TypeMethodDescriptionvoidonMessageReceive(String channel, String message) Called when this subscription connection receives a message from a channel.voidonPatternMessageReceive(String channelPattern, String channel, String message) Called when this subscription connection receives a message from a channel.voidonPatternSubscribe(String channelPattern, long channelTotal) Called when this subscription connection subscribes to a set of channels via a pattern.voidonPatternUnsubscribe(String channelPattern, long channelTotal) Called when this subscription connection unsubscribes from a set of channels via a pattern.voidonSubscribe(String channelName, long channelTotal) Called when this subscription connection subscribes to a channel.voidonUnsubscribe(String channelName, long channelTotal) Called when this subscription connection unsubscribes from a channel.
-
Method Details
-
onSubscribe
Called when this subscription connection subscribes to a channel.- Parameters:
channelName- the subscribed channel.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onUnsubscribe
Called when this subscription connection unsubscribes from a channel.- Parameters:
channelName- the channel that this unsubscribed from.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onPatternSubscribe
Called when this subscription connection subscribes to a set of channels via a pattern.- Parameters:
channelPattern- the channel pattern that this subscribed to.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onPatternUnsubscribe
Called when this subscription connection unsubscribes from a set of channels via a pattern.- Parameters:
channelPattern- the channel pattern that this unsubscribed from.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onMessageReceive
-
onPatternMessageReceive
Called when this subscription connection receives a message from a channel.- Parameters:
channelPattern- the channel pattern that was matched.channel- the channel that the message came from.message- the message received.
-