org.apache.james.imapserver
Class SimpleMessageAttributes

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.james.imapserver.SimpleMessageAttributes
All Implemented Interfaces:
org.apache.avalon.framework.logger.Loggable, MessageAttributes, java.io.Serializable

public class SimpleMessageAttributes
extends org.apache.avalon.framework.logger.AbstractLoggable
implements MessageAttributes, java.io.Serializable

Attributes of a Message in IMAP4rev1 style. Message Attributes should be set when a message enters a mailbox.

Note that the message in a mailbox have the same order using either Message Sequence Numbers or UIDs.

reinitialize() must be called on deserialization to reset Logger Reference: RFC 2060 - para 2.3

Version:
0.1 on 14 Dec 2000
Author:
Charles Benett
See Also:
Serialized Form

Method Summary
 java.lang.String getBodyStructure()
          Provides the Body Structure information for this message.
 java.lang.String getEnvelope()
          Provides the Envelope structure information for this message.
 java.util.Date getInternalDate()
          Provides the date and time at which the message was received.
 java.lang.String getInternalDateAsString()
          Returns IMAP formatted String representation of Date
 int getMessageSequenceNumber()
          Provides the current Message Sequence Number for this message.
 int getSize()
          Provides the sizeof the message in octets.
 int getUID()
          Provides the unique identity value for this message.
 
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
 

Method Detail

getMessageSequenceNumber

public int getMessageSequenceNumber()
Provides the current Message Sequence Number for this message. MSNs change when messages are expunged from the mailbox.
Specified by:
getMessageSequenceNumber in interface MessageAttributes

getUID

public int getUID()
Provides the unique identity value for this message. UIDs combined with a UIDValidity value form a unique reference for a message in a given mailbox. UIDs persist across sessions unless the UIDValidity value is incremented. UIDs are not copied if a message is copied to another mailbox.
Specified by:
getUID in interface MessageAttributes

getInternalDate

public java.util.Date getInternalDate()
Provides the date and time at which the message was received. In the case of delivery by SMTP, this SHOULD be the date and time of final delivery as defined for SMTP. In the case of messages copied from another mailbox, it shuld be the internalDate of the source message. In the case of messages Appended to the mailbox, example drafts, the internalDate is either specified in the Append command or is the current dat and time at the time of the Append.
Specified by:
getInternalDate in interface MessageAttributes

getInternalDateAsString

public java.lang.String getInternalDateAsString()
Description copied from interface: MessageAttributes
Returns IMAP formatted String representation of Date
Specified by:
getInternalDateAsString in interface MessageAttributes

getSize

public int getSize()
Provides the sizeof the message in octets.
Specified by:
getSize in interface MessageAttributes

getEnvelope

public java.lang.String getEnvelope()
Provides the Envelope structure information for this message. This is a parsed representation of the rfc-822 envelope information. This is not to be confused with the SMTP envelope!
Specified by:
getEnvelope in interface MessageAttributes

getBodyStructure

public java.lang.String getBodyStructure()
Provides the Body Structure information for this message. This is a parsed representtion of the MIME structure of the message.
Specified by:
getBodyStructure in interface MessageAttributes


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.