MarshallingEncoder.
A LengthFieldBasedFrameDecoder which use an Unmarshaller to read the Object out
of the ByteBuf.
| Modifier and Type | Field and Description |
|---|---|
| private final UnmarshallerProvider |
| Access | Constructor and Description |
|---|---|
| public | MarshallingDecoder(UnmarshallerProvider provider)
Creates a new decoder whose maximum object size is |
| public | MarshallingDecoder(UnmarshallerProvider provider, int
the maximum byte length of the serialized object.
if the length of the received object is greater
than this value, maxObjectSize)TooLongFrameException
will be raised.Creates a new decoder with the specified maximum object size. |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | decode(ChannelHandlerContext
the ctx, ByteBuf ChannelHandlerContext which this ByteToMessageDecoder belongs tothe in)ByteBuf from which to read dataOverrides io. ByteBuf and return it.
|
| protected ByteBuf | extractFrame(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length)
Overrides io. |
| provider | back to summary |
|---|---|
| private final UnmarshallerProvider provider | |
| MarshallingDecoder | back to summary |
|---|---|
| public MarshallingDecoder(UnmarshallerProvider provider) Creates a new decoder whose maximum object size is | |
| MarshallingDecoder | back to summary |
|---|---|
| public MarshallingDecoder(UnmarshallerProvider provider, int maxObjectSize) Creates a new decoder with the specified maximum object size.
| |
| decode | back to summary |
|---|---|
| protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception Overrides io. Doc from io. Create a frame out of the
| |
| extractFrame | back to summary |
|---|---|
| protected ByteBuf extractFrame(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length) Overrides io. Doc from io. Extract the sub-region of the specified buffer.
| |