|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.netty.handler.codec.serialization.ObjectEncoder
@ChannelPipelineCoverage(value="all") public class ObjectEncoder

An encoder which serializes a Java object into a ChannelBuffer.
Please note that the serialized form this encoder produces is not
compatible with the standard ObjectInputStream. Please use
ObjectDecoder or ObjectDecoderInputStream to ensure the
interoperability with this encoder.
Unless there's a requirement for the interoperability with the standard
object streams, it is recommended to use ObjectEncoder and
ObjectDecoder rather than CompatibleObjectEncoder and
CompatibleObjectDecoder.
| Constructor Summary | |
|---|---|
ObjectEncoder()
Creates a new encoder with the estimated length of 512 bytes. |
|
ObjectEncoder(int estimatedLength)
Creates a new encoder. |
|
| Method Summary | |
|---|---|
void |
handleDownstream(ChannelHandlerContext context,
ChannelEvent evt)
Handles the specified downstream event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectEncoder()
public ObjectEncoder(int estimatedLength)
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.| Method Detail |
|---|
public void handleDownstream(ChannelHandlerContext context,
ChannelEvent evt)
throws Exception
ChannelDownstreamHandler
handleDownstream in interface ChannelDownstreamHandlercontext - the context object for this handlerevt - the downstream event to process or intercept
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||