public class WriteTransformer
extends io.netty.handler.codec.MessageToMessageCodec<java.lang.Object,java.lang.Object>
ChannelHandler that transforms objects written to this channel.
Any String or byte[] written to the channel are converted to ByteBuf if no other
AllocatingTransformer is added that accepts these types.
If the last added AllocatingTransformer accepts the written message, then invoke all added transformers and
skip the primitive conversions.
| Constructor and Description |
|---|
WriteTransformer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptInboundMessage(java.lang.Object msg) |
boolean |
acceptOutboundMessage(java.lang.Object msg) |
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
java.util.List<java.lang.Object> out) |
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
java.util.List<java.lang.Object> out) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
bind, close, connect, deregister, disconnect, flush, readchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughthandlerAdded, handlerRemoved, isSharablepublic boolean acceptInboundMessage(java.lang.Object msg)
throws java.lang.Exception
acceptInboundMessage in class io.netty.handler.codec.MessageToMessageCodec<java.lang.Object,java.lang.Object>java.lang.Exceptionpublic boolean acceptOutboundMessage(java.lang.Object msg)
throws java.lang.Exception
acceptOutboundMessage in class io.netty.handler.codec.MessageToMessageCodec<java.lang.Object,java.lang.Object>java.lang.Exceptionprotected void encode(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
java.util.List<java.lang.Object> out)
throws java.lang.Exception
encode in class io.netty.handler.codec.MessageToMessageCodec<java.lang.Object,java.lang.Object>java.lang.Exceptionprotected void decode(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
java.util.List<java.lang.Object> out)
throws java.lang.Exception
decode in class io.netty.handler.codec.MessageToMessageCodec<java.lang.Object,java.lang.Object>java.lang.Exceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt)
throws java.lang.Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exception