com.hs.mail.imap.server.codec
Class ImapMessageDecoder
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.replay.ReplayingDecoder<ImapMessageDecoder.State>
com.hs.mail.imap.server.codec.ImapMessageDecoder
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
- Direct Known Subclasses:
- ImapRequestDecoder
public abstract class ImapMessageDecoder
- extends org.jboss.netty.handler.codec.replay.ReplayingDecoder<ImapMessageDecoder.State>
Decodes ChannelBuffer
into ImapMessage
.
- Since:
- Jan 22, 2010
- Author:
- Won Chul Doh
Constructor Summary |
protected |
ImapMessageDecoder()
Creates a new instance with the default. |
protected |
ImapMessageDecoder(int maxLineLength)
Creates a new instance with the specific parameter. |
Methods inherited from class org.jboss.netty.handler.codec.replay.ReplayingDecoder |
actualReadableBytes, channelClosed, channelDisconnected, checkpoint, checkpoint, decodeLast, exceptionCaught, getState, messageReceived, setState |
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler |
channelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
message
protected volatile ImapMessage message
ImapMessageDecoder
protected ImapMessageDecoder()
- Creates a new instance with the default.
maxLineLength (8192)
ImapMessageDecoder
protected ImapMessageDecoder(int maxLineLength)
- Creates a new instance with the specific parameter.
decode
protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
org.jboss.netty.buffer.ChannelBuffer buffer,
ImapMessageDecoder.State state)
throws Exception
- Specified by:
decode
in class org.jboss.netty.handler.codec.replay.ReplayingDecoder<ImapMessageDecoder.State>
- Throws:
Exception
createMessage
protected abstract ImapMessage createMessage(String line)
throws Exception
- Throws:
Exception
Copyright © 2011. All Rights Reserved.