com.lambdaworks.redis.pubsub
Class RedisPubSubAdapter<K,V>

java.lang.Object
  extended by com.lambdaworks.redis.pubsub.RedisPubSubAdapter<K,V>
Type Parameters:
V - Value type.
All Implemented Interfaces:
RedisPubSubListener<K,V>

public class RedisPubSubAdapter<K,V>
extends Object
implements RedisPubSubListener<K,V>

Convenience adapter with an empty implementation of all RedisPubSubListener callback methods.

Author:
Will Glozer

Constructor Summary
RedisPubSubAdapter()
           
 
Method Summary
 void message(K pattern, K channel, V message)
          Message received from a pattern subscription.
 void message(K channel, V message)
          Message received from a channel subscription.
 void psubscribed(K pattern, long count)
          Subscribed to a pattern.
 void punsubscribed(K pattern, long count)
          Unsubscribed from a pattern.
 void subscribed(K channel, long count)
          Subscribed to a channel.
 void unsubscribed(K channel, long count)
          Unsubscribed from a channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedisPubSubAdapter

public RedisPubSubAdapter()
Method Detail

message

public void message(K channel,
                    V message)
Description copied from interface: RedisPubSubListener
Message received from a channel subscription.

Specified by:
message in interface RedisPubSubListener<K,V>
Parameters:
channel - Channel.
message - Message.

message

public void message(K pattern,
                    K channel,
                    V message)
Description copied from interface: RedisPubSubListener
Message received from a pattern subscription.

Specified by:
message in interface RedisPubSubListener<K,V>
Parameters:
pattern - Pattern.
channel - Channel.
message - Message.

subscribed

public void subscribed(K channel,
                       long count)
Description copied from interface: RedisPubSubListener
Subscribed to a channel.

Specified by:
subscribed in interface RedisPubSubListener<K,V>
Parameters:
channel - Channel
count - Subscription count.

psubscribed

public void psubscribed(K pattern,
                        long count)
Description copied from interface: RedisPubSubListener
Subscribed to a pattern.

Specified by:
psubscribed in interface RedisPubSubListener<K,V>
Parameters:
pattern - Pattern.
count - Subscription count.

unsubscribed

public void unsubscribed(K channel,
                         long count)
Description copied from interface: RedisPubSubListener
Unsubscribed from a channel.

Specified by:
unsubscribed in interface RedisPubSubListener<K,V>
Parameters:
channel - Channel
count - Subscription count.

punsubscribed

public void punsubscribed(K pattern,
                          long count)
Description copied from interface: RedisPubSubListener
Unsubscribed from a pattern.

Specified by:
punsubscribed in interface RedisPubSubListener<K,V>
Parameters:
pattern - Channel
count - Subscription count.


Copyright © 2013. All Rights Reserved.