GigaSpaces XAP 10.0.1 API

org.openspaces.memcached.protocol.text
Class MemcachedCommandDecoder

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.openspaces.memcached.protocol.text.MemcachedCommandDecoder
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public final class MemcachedCommandDecoder
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler

The MemcachedCommandDecoder is responsible for taking lines from the MemcachedFrameDecoder and parsing them into CommandMessage instances for handling by the MemcachedCommandHandler

Protocol status is held in the SessionStatus instance which is shared between each of the decoders in the pipeline.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
MemcachedCommandDecoder(SessionStatus status)
           
 
Method Summary
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext channelHandlerContext, org.jboss.netty.channel.MessageEvent messageEvent)
          Process an inbound string from the pipeline's downstream, and depending on the state (waiting for data or processing commands), turn them into the correct type of command.
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, exceptionCaught, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemcachedCommandDecoder

public MemcachedCommandDecoder(SessionStatus status)
Method Detail

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext channelHandlerContext,
                            org.jboss.netty.channel.MessageEvent messageEvent)
                     throws Exception
Process an inbound string from the pipeline's downstream, and depending on the state (waiting for data or processing commands), turn them into the correct type of command.

Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Parameters:
channelHandlerContext - netty channel handler context
messageEvent - the netty event that corresponds to the message
Throws:
Exception

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.