SilverStream
Application Server 3.5

com.sssw.srv.mail
Class AgoMailAddressMailbox

java.lang.Object
 |
 +--com.sssw.srv.mail.AgoMailAddressMailbox

public class AgoMailAddressMailbox
extends Object

Stores one mailbox address, as defined in RFC 822. A mailbox is a single address. The address has a name portion and an address portion, either of which can be set or retrieved. The toString() method writes this address in the form name<address> where name may be surrounded by double quotes (") if necessary for quoting reasons. In AgoMailMessage, several methods return an Enumeration of objects. The returned objects are of type AgoMailAddressMailbox.


Constructor Summary
AgoMailAddressMailbox()
          A constructor for the AgoMailAddressMailbox class.
AgoMailAddressMailbox(String name, String address)
          A constructor for the AgoMailAddressMailbox class.
AgoMailAddressMailbox(String name, String address, String charset)
          A constructor for the AgoMailAddressMailbox class.
 
Method Summary
 String getAddress()
          Returns the address of the mailbox or null if not set.
 String getName()
          Returns the name of the mailbox or null if not set.
 void setAddress(String address)
          Sets the address of the mailbox.
 void setName(String name)
          Sets the name of the mailbox.
 void setName(String name, String charset)
          Sets the name and character set of the mailbox.
 String toString()
          Returns the mailbox as a String in the form name<address>.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgoMailAddressMailbox

public AgoMailAddressMailbox()
A constructor for the AgoMailAddressMailbox class.
Example:
     AgoMailAddressMailbox mailbox = new AgoMailAddressMailbox();
 

AgoMailAddressMailbox

public AgoMailAddressMailbox(String name,
                             String address)
A constructor for the AgoMailAddressMailbox class.
Parameters:
name - specifies the name portion of the mailbox.
address - specifies the address portion of the mailbox.
Example:
     AgoMailAddressMailbox mailbox = new AgoMailAddressMailbox("Bob T. Smith","bob@company.com");
 

AgoMailAddressMailbox

public AgoMailAddressMailbox(String name,
                             String address,
                             String charset)
A constructor for the AgoMailAddressMailbox class.
Parameters:
name - specifies the name portion of the mailbox.
address - specifies the address portion of the mailbox.
charset - specifies the charset of name.
Method Detail

getName

public String getName()
Returns the name of the mailbox or null if not set.
Example:
     String name = mailbox.getName();
 
See Also:
AgoMailAddressMailbox.setName( String name )

setName

public void setName(String name)
Sets the name of the mailbox.
Parameters:
name - specifies the name to assign to the mailbox.
Example:
     mailbox.setName("Bob T. Smith");
 
See Also:
AgoMailAddressMailbox.setName( String name, String charset ), AgoMailAddressMailbox.getName()

setName

public void setName(String name,
                    String charset)
Sets the name and character set of the mailbox.
Parameters:
name - specifies the name to assign to the mailbox.
charset - specifies the charset of the name.
See Also:
AgoMailAddressMailbox.getName(), AgoMailAddressMailbox.setName( String name )

getAddress

public String getAddress()
Returns the address of the mailbox or null if not set.
Example:
     String addr = mailbox.getAddress();
 
See Also:
AgoMailAddressMailbox.setAddress( String address )

setAddress

public void setAddress(String address)
Sets the address of the mailbox.
Parameters:
address - the address to assign.
Usage:

The address must comply with the RFC 821 address specification.

Example:
     mailbox.setAddress("bob@company.com");
 
See Also:
AgoMailAddressMailbox.getAddress()

toString

public String toString()
Returns the mailbox as a String in the form name<address>.
Overrides:
toString in class Object
Usage:

If the name needs to be quoted according to RFC 822 rules, it is output surrounded by double quotes ("). Overrides toString in class Object.

Example:
     String aString = mailbox.toString();
 

SilverStream
Application Server 3.5