This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.mail
class Message.RecipientType

javax.mail.Message.RecipientType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MimeMessage.RecipientType
Enclosing class:
Message

public static class Message.RecipientType
extends Object
implements Serializable

This inner class defines the types of recipients allowed by the Message class. The currently defined types are TO, CC and BCC. Note that this class only has a protected constructor, thereby restricting new Recipient types to either this class or subclasses. This effectively implements an enumeration of the allowed Recipient types. The following code sample shows how to use this class to obtain the "TO" recipients from a message.


 Message msg = folder.getMessages(1);
 Address[] a = m.getRecipients(Message.RecipientType.TO);

 


Field Summary
static Message.RecipientType BCC
          The "Bcc" (blind carbon copy) recipients.
static Message.RecipientType CC
          The "Cc" (carbon copy) recipients.
static Message.RecipientType TO
          The "To" (primary) recipients.
protected String type
          The type of recipient, usually the name of a corresponding Internet standard header.
 
Constructor Summary
protected

          Constructor for use by subclasses.
 
Method Summary
protected Object

          When deserializing a RecipientType, we need to make sure to return only one of the known static final instances defined in this class.
 String

          
 

Field Detail

BCC

public static final Message.RecipientType BCC
The "Bcc" (blind carbon copy) recipients.

CC

public static final Message.RecipientType CC
The "Cc" (carbon copy) recipients.

TO

public static final Message.RecipientType TO
The "To" (primary) recipients.

type

protected String type
The type of recipient, usually the name of a corresponding Internet standard header.
Constructor Detail

Message.RecipientType

protected Message.RecipientType(String type)
Constructor for use by subclasses.

Parameters:
type
Method Detail

readResolve

protected Object readResolve()
                      throws ObjectStreamException
When deserializing a RecipientType, we need to make sure to return only one of the known static final instances defined in this class. Subclasses must implement their own readResolve method that checks for their known instances before calling this super method.

Throws:
ObjectStreamException

toString

public String toString()
Overrides:
toString in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention. The official Sun™ documentation can be found here at http://java.sun.com/products/javamail/javadocs/index.html.