ml.shifu.guagua.io
类 NettyBytableEncoder
java.lang.Object
org.jboss.netty.handler.codec.oneone.OneToOneEncoder
org.jboss.netty.handler.codec.serialization.ObjectEncoder
ml.shifu.guagua.io.NettyBytableEncoder
- 所有已实现的接口:
- org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler
public class NettyBytableEncoder
- extends org.jboss.netty.handler.codec.serialization.ObjectEncoder
A encoder to encode Bytable instance to coded bytes array for netty pipeline.
| 从接口 org.jboss.netty.channel.ChannelHandler 继承的嵌套类/接口 |
org.jboss.netty.channel.ChannelHandler.Sharable |
|
方法摘要 |
protected Object |
encode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
Object msg)
|
| 从类 org.jboss.netty.handler.codec.oneone.OneToOneEncoder 继承的方法 |
doEncode, handleDownstream |
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NettyBytableEncoder
public NettyBytableEncoder()
- Creates a new encoder with the estimated length of 64k bytes.
NettyBytableEncoder
public NettyBytableEncoder(int estimatedLength)
- Creates a new encoder.
- 参数:
estimatedLength - the estimated byte length of the serialized form of an object.If the length of the serialized form
exceeds this value, the internal buffer will be expanded automatically at the cost of memory
bandwidth. If this value is too big, it will also waste memory bandwidth. To avoid unnecessary memory
copy or allocation cost, please specify the properly estimated value.
encode
protected Object encode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
Object msg)
throws Exception
- 覆盖:
- 类
org.jboss.netty.handler.codec.serialization.ObjectEncoder 中的 encode
- 抛出:
Exception
Copyright © 2015. All Rights Reserved.