public abstract class AbstractChainedImapEncoder extends Object implements ImapEncoder
ImapEncoder implementations.
Implementations of this will check if the ImapMessage should get
encoded by this Implementation or should get passed to the next
ImapEncoder in the chain| Constructor and Description |
|---|
AbstractChainedImapEncoder(ImapEncoder next) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
chainEncode(ImapMessage message,
ImapResponseComposer composer,
ImapSession session)
Call next Encoder in the chain
|
protected abstract void |
doEncode(ImapMessage acceptableMessage,
ImapResponseComposer composer,
ImapSession session)
Processes an acceptable message.
|
void |
encode(ImapMessage message,
ImapResponseComposer composer,
ImapSession session)
Encode the
ImapMessage if isAcceptable(ImapMessage)
return true, if not pass it to the next encoder in the chain |
protected abstract boolean |
isAcceptable(ImapMessage message)
Is the given message acceptable?
|
public AbstractChainedImapEncoder(ImapEncoder next)
public void encode(ImapMessage message, ImapResponseComposer composer, ImapSession session) throws IOException
ImapMessage if isAcceptable(ImapMessage)
return true, if not pass it to the next encoder in the chainencode in interface ImapEncodermessage - ImapMessage, not nullcomposer - ImapResponseComposer, not nullsession - TODOIOException - when message encoding failsprotected void chainEncode(ImapMessage message, ImapResponseComposer composer, ImapSession session) throws IOException
message - composer - session - IOExceptionprotected abstract boolean isAcceptable(ImapMessage message)
message - ImapMessage, not nullprotected abstract void doEncode(ImapMessage acceptableMessage, ImapResponseComposer composer, ImapSession session) throws IOException
isAcceptable(ImapMessage) should be passed to this method.acceptableMessage - ImapMessage, not nullcomposer - ImapResponseComposer, not nullsession - TODOIOExceptionCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.