org.jboss.netty.handler.codec.oneone
类 OneToOneDecoder

java.lang.Object
  继承者 org.jboss.netty.handler.codec.oneone.OneToOneDecoder
所有已实现的接口:
ChannelHandler, ChannelUpstreamHandler
直接已知子类:
Base64Decoder, ProtobufDecoder, StringDecoder, ZlibDecoder

public abstract class OneToOneDecoder
extends java.lang.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() { ... });
 


嵌套类摘要
 
从接口 org.jboss.netty.channel.ChannelHandler 继承的嵌套类/接口
ChannelHandler.Sharable
 
方法摘要
 void handleUpstream(ChannelHandlerContext ctx, ChannelEvent evt)
          处理一个指定的上游事件.
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

handleUpstream

public void handleUpstream(ChannelHandlerContext ctx,
                           ChannelEvent evt)
                    throws java.lang.Exception
从接口 ChannelUpstreamHandler 复制的描述
处理一个指定的上游事件.

指定者:
接口 ChannelUpstreamHandler 中的 handleUpstream
参数:
ctx - 处理器的上下文对象
evt - 要处理或拦截的事件
抛出:
java.lang.Exception