public class Notification
extends java.lang.Object
The NotificationMessage represents the actually sendable MDN.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DefaultExplanationFailed |
| Constructor and Description |
|---|
Notification(Disposition disposition)
Initializes a new instance with the supplied
Disposition |
Notification(NotificationType notification)
Initializes a new instance of the supplied notification type.
|
| Modifier and Type | Method and Description |
|---|---|
javax.mail.internet.MimeMultipart |
getAsMultipart()
Gets the notification object as a MimeMultipart object;
|
Disposition |
getDisposition()
Gets the
Disposition for this instance. |
java.lang.String |
getError()
Gets the value of the error header.
|
java.lang.String |
getExplanation()
Gets the body part corresponding to the notification explanation.
|
java.util.Collection<java.lang.String> |
getExtensions()
Gets the list of extension values
|
java.lang.String |
getFailure()
Gets the value of the failure header.
|
java.lang.String |
getFinalRecipeint()
Gets the final recipient for this instance.
|
MdnGateway |
getGateway()
Gets the gateway that triggered this notification (optional).
|
java.io.InputStream |
getInputStream()
Gets an input stream of this notification that can be serialized.
|
javax.mail.internet.InternetHeaders |
getNotificationFieldsAsHeaders()
Parses the notification part fields into InternetHeaders.
|
static javax.mail.internet.InternetHeaders |
getNotificationFieldsAsHeaders(javax.mail.internet.MimeMessage message)
Parses the notification part fields of a MDN MimeMessage message.
|
static javax.mail.internet.InternetHeaders |
getNotificationFieldsAsHeaders(javax.mail.internet.MimeMultipart mm)
Parses the notification part fields of the MimeMultipart body of a MDN message.
|
java.lang.String |
getOriginalMessageId()
Gets the ID of the message that triggered this notification (optional).
|
java.util.Collection<MimeEntity> |
getParts()
Returns a collection of body parts of the multipart report for this notification.
|
ReportingUserAgent |
getReportingAgent()
Gets the reporting agent that triggered this notification (optional).
|
java.lang.String |
getWarning()
Gets the value of the warning header.
|
byte[] |
serializeToBytes()
Serializes the notification to an array of bytes.
|
void |
setDisposition(Disposition disposition)
Sets the
Disposition for this instance. |
void |
setError(java.lang.String error)
Sets the value of the error header.
|
void |
setExplanation(java.lang.String explanation)
Sets the body part corresponding to the notification explanation.
|
void |
setExtensions(java.util.Collection<java.lang.String> extensions)
Sets the list of extension fields.
|
void |
setFailure(java.lang.String failure)
Sets the value of the failure header.
|
void |
setFinalRecipient(java.lang.String recip)
Sets final recipient.
|
void |
setGateway(MdnGateway gateway)
Sets the gateway that triggered this notification (optional).
|
void |
setOriginalMessageId(java.lang.String messageId)
Sets the ID of the message that triggered this notification (optional).
|
void |
setReportingAgent(ReportingUserAgent reportingAgent)
Sets the reporting agent that triggered this notification (optional).
|
void |
setWarning(java.lang.String warning)
Sets the value of the warning header.
|
java.lang.String |
toString() |
public static final java.lang.String DefaultExplanationFailed
public Notification(NotificationType notification)
notification - The notification disposition for this instance.public Notification(Disposition disposition)
Dispositiondisposition - The notification disposition for this instance.public java.lang.String getExplanation()
From RFC 3798, section 3, item b:
The first component of the multipart/report contains a human- readable explanation of the MDN, as described in [RFC-REPORT].
public void setExplanation(java.lang.String explanation)
explanation - The body part corresponding to the notification explanation.public ReportingUserAgent getReportingAgent()
public void setReportingAgent(ReportingUserAgent reportingAgent)
reportingAgent - The reporting agent that triggered this notificationpublic MdnGateway getGateway()
public void setGateway(MdnGateway gateway)
gateway - The gateway that triggered this notificationpublic java.lang.String getOriginalMessageId()
public void setOriginalMessageId(java.lang.String messageId)
messageId - The ID of the message that triggered this notificationpublic java.lang.String getFinalRecipeint()
public void setFinalRecipient(java.lang.String recip)
messageId - The final recipient.public Disposition getDisposition()
Disposition for this instance.Disposition for this instancepublic void setDisposition(Disposition disposition)
Disposition for this instance.disposition - The Disposition for this instancepublic java.lang.String getError()
public void setError(java.lang.String error)
error - The value of the error header.public void setWarning(java.lang.String warning)
warning - The value of the warning header.public java.lang.String getWarning()
public void setFailure(java.lang.String failure)
failure - The value of the failure header.public java.lang.String getFailure()
public void setExtensions(java.util.Collection<java.lang.String> extensions)
failure - List of exentension values.public java.util.Collection<java.lang.String> getExtensions()
public java.util.Collection<MimeEntity> getParts()
public javax.mail.internet.MimeMultipart getAsMultipart()
public byte[] serializeToBytes()
public java.io.InputStream getInputStream()
public java.lang.String toString()
toString in class java.lang.Objectpublic javax.mail.internet.InternetHeaders getNotificationFieldsAsHeaders()
public static javax.mail.internet.InternetHeaders getNotificationFieldsAsHeaders(javax.mail.internet.MimeMessage message)
public static javax.mail.internet.InternetHeaders getNotificationFieldsAsHeaders(javax.mail.internet.MimeMultipart mm)
Copyright © 2010-2019 NHIN Direct. All Rights Reserved.