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

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelHandler
      extended by com.lambdaworks.redis.protocol.CommandHandler<K,V>
          extended by com.lambdaworks.redis.pubsub.PubSubCommandHandler<K,V>
Type Parameters:
K - Key type.
V - Value type.
All Implemented Interfaces:
ChannelDownstreamHandler, ChannelHandler, ChannelUpstreamHandler

public class PubSubCommandHandler<K,V>
extends CommandHandler<K,V>

A netty ChannelHandler responsible for writing redis pub/sub commands and reading the response stream from the server.

Author:
Will Glozer

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
 
Field Summary
 
Fields inherited from class com.lambdaworks.redis.protocol.CommandHandler
buffer, queue, rsm
 
Constructor Summary
PubSubCommandHandler(BlockingQueue<Command<K,V,?>> queue, RedisCodec<K,V> codec)
          Initialize a new instance.
 
Method Summary
protected  void decode(ChannelHandlerContext ctx, ChannelBuffer buffer)
           
 
Methods inherited from class com.lambdaworks.redis.protocol.CommandHandler
channelOpen, messageReceived, writeRequested
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PubSubCommandHandler

public PubSubCommandHandler(BlockingQueue<Command<K,V,?>> queue,
                            RedisCodec<K,V> codec)
Initialize a new instance.

Parameters:
queue - Command queue.
codec - Codec.
Method Detail

decode

protected void decode(ChannelHandlerContext ctx,
                      ChannelBuffer buffer)
               throws InterruptedException
Overrides:
decode in class CommandHandler<K,V>
Throws:
InterruptedException


Copyright © 2013. All Rights Reserved.