Package com.blackrook.redis.event
Class RedisSubscriptionAdapter
- java.lang.Object
-
- com.blackrook.redis.event.RedisSubscriptionAdapter
-
- All Implemented Interfaces:
RedisSubscriptionListener
public class RedisSubscriptionAdapter extends Object implements RedisSubscriptionListener
An adapter class forRedisSubscriptionListener. All methods do nothing on call.- Author:
- Matthew Tropiano
-
-
Constructor Summary
Constructors Constructor Description RedisSubscriptionAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonMessageReceive(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 Detail
-
onSubscribe
public void onSubscribe(String channelName, long channelTotal)
Description copied from interface:RedisSubscriptionListenerCalled when this subscription connection subscribes to a channel.- Specified by:
onSubscribein interfaceRedisSubscriptionListener- Parameters:
channelName- the subscribed channel.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onUnsubscribe
public void onUnsubscribe(String channelName, long channelTotal)
Description copied from interface:RedisSubscriptionListenerCalled when this subscription connection unsubscribes from a channel.- Specified by:
onUnsubscribein interfaceRedisSubscriptionListener- Parameters:
channelName- the channel that this unsubscribed from.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onPatternSubscribe
public void onPatternSubscribe(String channelPattern, long channelTotal)
Description copied from interface:RedisSubscriptionListenerCalled when this subscription connection subscribes to a set of channels via a pattern.- Specified by:
onPatternSubscribein interfaceRedisSubscriptionListener- Parameters:
channelPattern- the channel pattern that this subscribed to.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onPatternUnsubscribe
public void onPatternUnsubscribe(String channelPattern, long channelTotal)
Description copied from interface:RedisSubscriptionListenerCalled when this subscription connection unsubscribes from a set of channels via a pattern.- Specified by:
onPatternUnsubscribein interfaceRedisSubscriptionListener- Parameters:
channelPattern- the channel pattern that this unsubscribed from.channelTotal- the total number of channels that this subscriber is subscribed to.
-
onMessageReceive
public void onMessageReceive(String channel, String message)
Description copied from interface:RedisSubscriptionListenerCalled when this subscription connection receives a message from a channel.- Specified by:
onMessageReceivein interfaceRedisSubscriptionListener- Parameters:
channel- the channel that the message came from.message- the message received.
-
onPatternMessageReceive
public void onPatternMessageReceive(String channelPattern, String channel, String message)
Description copied from interface:RedisSubscriptionListenerCalled when this subscription connection receives a message from a channel.- Specified by:
onPatternMessageReceivein interfaceRedisSubscriptionListener- Parameters:
channelPattern- the channel pattern that was matched.channel- the channel that the message came from.message- the message received.
-
-