org.apache.avro.ipc
Class NettyTransportCodec.NettyFrameEncoder

java.lang.Object
  extended by org.jboss.netty.handler.codec.oneone.OneToOneEncoder
      extended by org.apache.avro.ipc.NettyTransportCodec.NettyFrameEncoder
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler
Enclosing class:
NettyTransportCodec

public static class NettyTransportCodec.NettyFrameEncoder
extends org.jboss.netty.handler.codec.oneone.OneToOneEncoder

Protocol encoder which converts NettyDataPack which contains the Responder's output List<ByteBuffer> to ChannelBuffer needed by Netty.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
NettyTransportCodec.NettyFrameEncoder()
           
 
Method Summary
protected  Object encode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, Object msg)
          encode msg to ChannelBuffer
 
Methods inherited from class org.jboss.netty.handler.codec.oneone.OneToOneEncoder
handleDownstream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NettyTransportCodec.NettyFrameEncoder

public NettyTransportCodec.NettyFrameEncoder()
Method Detail

encode

protected Object encode(org.jboss.netty.channel.ChannelHandlerContext ctx,
                        org.jboss.netty.channel.Channel channel,
                        Object msg)
                 throws Exception
encode msg to ChannelBuffer

Specified by:
encode in class org.jboss.netty.handler.codec.oneone.OneToOneEncoder
Parameters:
msg - NettyDataPack from NettyServerAvroHandler/NettyClientAvroHandler in the pipeline
Returns:
encoded ChannelBuffer
Throws:
Exception


Copyright © 2010 The Apache Software Foundation