net.sf.jabb.netty
Class XmlDecoder.XmlStringDecoder
java.lang.Object
org.jboss.netty.handler.codec.oneone.OneToOneDecoder
net.sf.jabb.netty.XmlDecoder.XmlStringDecoder
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
- Enclosing class:
- XmlDecoder
protected static class XmlDecoder.XmlStringDecoder
- extends org.jboss.netty.handler.codec.oneone.OneToOneDecoder
Further process the messages already processed by
FrameDecoder to make it clean XML text messages.
把经过FrameDecoder处理过后的消息,进一步加工为头尾完整干净的XML文本。
Don't use this class directly. It is a supporting class for XmlDecoder.
不要直接用这个类,它是支撑XmlDecoder的。
- Author:
- Zhengmao HU (James)
| Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
org.jboss.netty.channel.ChannelHandler.Sharable |
|
Method Summary |
protected Object |
decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
Object msg)
Get the text and process its beginning and ending to make it a clean XML text.
先取到字符串,然后把取得的字符串进一步加工,以形成头尾完整干净的XML文本。 |
| Methods inherited from class org.jboss.netty.handler.codec.oneone.OneToOneDecoder |
handleUpstream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlDecoder.XmlStringDecoder
public XmlDecoder.XmlStringDecoder(String tagName,
Charset charset)
- Constructor.
创建一个实例。
- Parameters:
tagName - charset -
decode
protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
Object msg)
throws Exception
- Get the text and process its beginning and ending to make it a clean XML text.
先取到字符串,然后把取得的字符串进一步加工,以形成头尾完整干净的XML文本。
- Specified by:
decode in class org.jboss.netty.handler.codec.oneone.OneToOneDecoder
- Throws:
Exception
Copyright © 2012. All Rights Reserved.