Class OneToOneDecoder

java.lang.Object
org.jboss.netty.handler.codec.oneone.OneToOneDecoder
All Implemented Interfaces:
ChannelHandler, ChannelUpstreamHandler
Direct Known Subclasses:
Base64Decoder, ProtobufDecoder, SpdyHttpDecoder, StringDecoder, WebSocketFrameAggregator, ZlibDecoder

public abstract class OneToOneDecoder extends Object implements ChannelUpstreamHandler
Transforms a received message into another message. Please note that this decoder must be used with a proper FrameDecoder such as DelimiterBasedFrameDecoder or you must implement proper framing mechanism by yourself if you are using a stream-based transport such as TCP/IP. A typical setup for TCP/IP would be:
 ChannelPipeline pipeline = ...;

 // Decoders
 pipeline.addLast("frameDecoder", new DelimiterBasedFrameDecoder(80, Delimiters.nulDelimiter()));
 pipeline.addLast("customDecoder", new OneToOneDecoder() { ... });

 // Encoder
 pipeline.addLast("customEncoder", new OneToOneEncoder() { ... });
 
  • Constructor Details

    • OneToOneDecoder

      protected OneToOneDecoder()
      Creates a new instance with the current system character set.
  • Method Details