org.apache.james.imapserver
Class BaseCommand

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.james.BaseConnectionHandler
              |
              +--org.apache.james.imapserver.BaseCommand
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.Loggable
Direct Known Subclasses:
CommandFetch, CommandStore, SingleThreadedConnectionHandler

public abstract class BaseCommand
extends BaseConnectionHandler

Provides methods useful for IMAP command objects. References: rfc 2060, rfc 2193, rfc 2221

Version:
0.1 on 17 Jan 2001
Author:
Charles Benett

Fields inherited from class org.apache.james.BaseConnectionHandler
helloName, timeout
 
Constructor Summary
BaseCommand()
           
 
Method Summary
protected  java.util.List decodeSet(java.lang.String rawSet, int exists)
          Turns a protocol-compliant string representing a message sequence number set into a List of integers.
protected  java.util.List decodeUIDSet(java.lang.String rawSet, java.util.List uidsList)
          Turns a protocol-compliant string representing a uid set into a List of integers.
 
Methods inherited from class org.apache.james.BaseConnectionHandler
configure
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCommand

public BaseCommand()
Method Detail

decodeSet

protected java.util.List decodeSet(java.lang.String rawSet,
                                   int exists)
                            throws java.lang.IllegalArgumentException
Turns a protocol-compliant string representing a message sequence number set into a List of integers. Use of the wildcard * (star) relies on contiguous property of msns.
Parameters:
rawSet - the IMAP protocol compliant string to be decoded
exists - the number of messages in this mailbox

decodeUIDSet

protected java.util.List decodeUIDSet(java.lang.String rawSet,
                                      java.util.List uidsList)
                               throws java.lang.IllegalArgumentException
Turns a protocol-compliant string representing a uid set into a List of integers. Where the string requests ranges or uses the * (star) wildcard, the results are uids that exist in the mailbox. This minimizes attempts to refer to non-existent messages.
Parameters:
rawSet - the IMAP protocol compliant string to be decoded
uidsList - List of uids of messages in mailbox


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.