IT. Expert System.

Java Enterprise Edition (EE)

Message.RecipientType


javax.mail
Class Message.RecipientType

java.lang.Object
  javax.mail.Message.RecipientType
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MimeMessage.RecipientType
Enclosing class:
Message
public static class Message.RecipientType
extends java.lang.Object
implements java.io.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);

 

See Also:
Message.getRecipients(javax.mail.Message.RecipientType), Message.setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[]), Message.addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[]), Serialized Form

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  java.lang.String type
          The type of recipient, usually the name of a corresponding Internet standard header.
 
Constructor Summary
protected Message.RecipientType(java.lang.String type)
          Constructor for use by subclasses.
 
Method Summary
protected  java.lang.Object readResolve()
          When deserializing a RecipientType, we need to make sure to return only one of the known static final instances defined in this class.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TO

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

CC

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

BCC

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

type

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

Constructor Detail

Message.RecipientType

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

Method Detail

readResolve

protected java.lang.Object readResolve()
                                throws java.io.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:
java.io.ObjectStreamException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3907 / . Delta: 0.00655 с