java.lang.Object
jakarta.mail.Message.RecipientType
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- MimeMessage.RecipientType
- Enclosing class:
- Message
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 SummaryFieldsModifier and TypeFieldDescriptionstatic final Message.RecipientTypeThe "Bcc" (blind carbon copy) recipients.static final Message.RecipientTypeThe "Cc" (carbon copy) recipients.static final Message.RecipientTypeThe "To" (primary) recipients.protected StringThe type of recipient, usually the name of a corresponding Internet standard header.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedRecipientType(String type) Constructor for use by subclasses.
- 
Method Summary
- 
Field Details- 
TOThe "To" (primary) recipients.
- 
CCThe "Cc" (carbon copy) recipients.
- 
BCCThe "Bcc" (blind carbon copy) recipients.
- 
typeThe type of recipient, usually the name of a corresponding Internet standard header.
 
- 
- 
Constructor Details- 
RecipientTypeConstructor for use by subclasses.- Parameters:
- type- the recipient type
 
 
- 
- 
Method Details- 
readResolveWhen 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 ownreadResolvemethod that checks for their known instances before calling this super method.- Returns:
- the RecipientType object instance
- Throws:
- ObjectStreamException- for object stream errors
 
- 
toString
 
-