SilverStream
Application Server 3.5

com.sssw.srv.mail
Class AgoRFC822HeaderFieldMailBox

java.lang.Object
 |
 +--com.sssw.srv.mail.AgoRFC822HeaderField
       |
       +--com.sssw.srv.mail.AgoRFC822HeaderFieldMailBox

public class AgoRFC822HeaderFieldMailBox
extends AgoRFC822HeaderField

Class used to store a single mailbox. For example, the Sender field might contain only a single mailbox while the From field may contain more than one mailbox. If getHeaderField("Sender") is called on an AgoMIMEPart, getHeaderField() returns an instance of AgoRFC822HeaderFieldMailBox. (The AgoRFC822HeaderFieldMailBox class is a subclass of AgoRFC822HeaderField.)


Constructor Summary
AgoRFC822HeaderFieldMailBox(String fieldname, AgoMailAddressMailbox mailbox)
          The constructor for the AgoRFC822HeaderFieldMailBox class.
 
Method Summary
 AgoMailAddressMailbox getMailbox()
          Gets the mailbox.
 void setMailbox(AgoMailAddressMailbox mailbox)
          Sets the field body to a specified mailbox, overwriting any mailbox that may already be in the header.
 
Methods inherited from class com.sssw.srv.mail.AgoRFC822HeaderField
getName, setName, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgoRFC822HeaderFieldMailBox

public AgoRFC822HeaderFieldMailBox(String fieldname,
                                   AgoMailAddressMailbox mailbox)
The constructor for the AgoRFC822HeaderFieldMailBox class.
Parameters:
fieldname - the name of the header field.
mailbox - the mailbox to use as the value of this header.
Example:
     AgoMailAddressMailbox mailbox = new AgoMailAddressMailbox();
     mailbox.setName("Bob T. Smith");
     mailbox.setAddress("bob@company.com");
     AgoRFC822HeaderFieldMailBox hField = new AgoRFC822HeaderFieldMailBox("Sender", mailbox);
 
Method Detail

getMailbox

public AgoMailAddressMailbox getMailbox()
Gets the mailbox.
Example:
     AgoMailAddressMailbox mailbox = hField.getMailbox();
 

setMailbox

public void setMailbox(AgoMailAddressMailbox mailbox)
Sets the field body to a specified mailbox, overwriting any mailbox that may already be in the header.
Parameters:
mailbox - specifies the mailbox to which the field body is set.
Example:
     AgoMailAddressMailbox mailbox = new AgoMailAddressMailbox();
     mailbox.setName("Bob T. Smith");
     mailbox.setAddress("bob@company.com");
     hField.setMailbox(mailbox);
 

SilverStream
Application Server 3.5