|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.mail.Multipart
javax.mail.internet.MimeMultipart
com.sun.mail.dsn.MultipartReport
public class MultipartReport
A multipart/report message content, as defined in RFC 3462. A multipart/report content is a container for mail reports of any kind, and is most often used to return a delivery status report. This class only supports that most common usage.
A MultipartReport object is a special type of MimeMultipart object with a restricted set of body parts. A MultipartReport object contains:
DeliveryStatus object containing the
details for why the report was generated.
| 字段摘要 | |
|---|---|
protected boolean |
constructed
|
| 从类 javax.mail.internet.MimeMultipart 继承的字段 |
|---|
ds, parsed |
| 从类 javax.mail.Multipart 继承的字段 |
|---|
contentType, parent, parts |
| 构造方法摘要 | |
|---|---|
MultipartReport()
Construct a multipart/report object with no content. |
|
MultipartReport(DataSource ds)
Constructs a MultipartReport object and its bodyparts from the given DataSource. |
|
MultipartReport(String text,
DeliveryStatus status)
Construct a multipart/report object with the specified plain text and delivery status to be returned to the user. |
|
MultipartReport(String text,
DeliveryStatus status,
InternetHeaders hdr)
Construct a multipart/report object with the specified plain text, delivery status, and headers from the original message to be returned to the user. |
|
MultipartReport(String text,
DeliveryStatus status,
MimeMessage msg)
Construct a multipart/report object with the specified plain text, delivery status, and original message to be returned to the user. |
|
| 方法摘要 | |
|---|---|
void |
addBodyPart(BodyPart part)
Adds a Part to the multipart. |
void |
addBodyPart(BodyPart part,
int index)
Adds a BodyPart at position index. |
DeliveryStatus |
getDeliveryStatus()
Get the delivery status associated with this multipart/report. |
MimeMessage |
getReturnedMessage()
Get the original message that is being returned along with this multipart/report. |
String |
getText()
Get the plain text to be presented to the user, if there is any. |
MimeBodyPart |
getTextBodyPart()
Return the body part containing the message to be presented to the user, usually just a text/plain part. |
boolean |
removeBodyPart(BodyPart part)
Remove the specified part from the multipart message. |
void |
removeBodyPart(int index)
Remove the part at specified location (starting from 0). |
void |
setDeliveryStatus(DeliveryStatus status)
Set the delivery status associated with this multipart/report. |
void |
setReturnedMessage(MimeMessage msg)
Set the original message to be returned as part of the multipart/report. |
void |
setSubType(String subtype)
Set the subtype. |
void |
setText(String text)
Set the message to be presented to the user as just a text/plain part containing the specified text. |
void |
setTextBodyPart(MimeBodyPart mbp)
Set the body part containing the text to be presented to the user. |
| 从类 javax.mail.internet.MimeMultipart 继承的方法 |
|---|
createInternetHeaders, createMimeBodyPart, createMimeBodyPart, getBodyPart, getBodyPart, getCount, getPreamble, isComplete, parse, setPreamble, updateHeaders, writeTo |
| 从类 javax.mail.Multipart 继承的方法 |
|---|
getContentType, getParent, setMultipartDataSource, setParent |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected boolean constructed
| 构造方法详细信息 |
|---|
public MultipartReport()
throws MessagingException
MessagingException
public MultipartReport(String text,
DeliveryStatus status)
throws MessagingException
MessagingException
public MultipartReport(String text,
DeliveryStatus status,
MimeMessage msg)
throws MessagingException
MessagingException
public MultipartReport(String text,
DeliveryStatus status,
InternetHeaders hdr)
throws MessagingException
MessagingException
public MultipartReport(DataSource ds)
throws MessagingException
ds - DataSource, can be a MultipartDataSource
MessagingException| 方法详细信息 |
|---|
public String getText()
throws MessagingException
getTextBodyPart method may be used to extract the data.
MessagingException
public void setText(String text)
throws MessagingException
MessagingException
public MimeBodyPart getTextBodyPart()
throws MessagingException
MessagingException
public void setTextBodyPart(MimeBodyPart mbp)
throws MessagingException
MessagingException
public DeliveryStatus getDeliveryStatus()
throws MessagingException
MessagingException
public void setDeliveryStatus(DeliveryStatus status)
throws MessagingException
MessagingException
public MimeMessage getReturnedMessage()
throws MessagingException
MessagingException
public void setReturnedMessage(MimeMessage msg)
throws MessagingException
MessagingException
public void setSubType(String subtype)
throws MessagingException
MimeMultipart 中的 setSubTypesubtype - Subtype
MessagingException - always; can't change subtype
public boolean removeBodyPart(BodyPart part)
throws MessagingException
MimeMultipart 中的 removeBodyPartpart - The part to remove
MessagingException - always
public void removeBodyPart(int index)
throws MessagingException
MimeMultipart 中的 removeBodyPartindex - Index of the part to remove
MessagingException - always
public void addBodyPart(BodyPart part)
throws MessagingException
MimeMultipart 中的 addBodyPartpart - The Part to be appended
MessagingException - always
public void addBodyPart(BodyPart part,
int index)
throws MessagingException
index.
Not allowed on a multipart/report object.
MimeMultipart 中的 addBodyPartpart - The BodyPart to be insertedindex - Location where to insert the part
MessagingException - always
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||