|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nhindirect.stagent.mail.notifications.Notification
public class Notification
Represents notification (MDN) content.
The NotificationMessage represents the actually sendable MDN.
| Constructor Summary | |
|---|---|
Notification(Disposition disposition)
Initializes a new instance with the supplied Disposition |
|
Notification(NotificationType notification)
Initializes a new instance of the supplied notification type. |
|
| Method Summary | |
|---|---|
javax.mail.internet.MimeMultipart |
getAsMultipart()
Gets the notification object as a MimeMultipart object; |
Disposition |
getDisposition()
Gets the Disposition for this instance. |
String |
getError()
Gets the value of the error header. |
String |
getExplanation()
Gets the body part corresponding to the notification explanation. |
Collection<String> |
getExtensions()
Gets the list of extension values |
String |
getFailure()
Gets the value of the failure header. |
String |
getFinalRecipeint()
Gets the final recipient for this instance. |
MdnGateway |
getGateway()
Gets the gateway that triggered this notification (optional). |
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. |
String |
getOriginalMessageId()
Gets the ID of the message that triggered this notification (optional). |
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). |
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(String error)
Sets the value of the error header. |
void |
setExplanation(String explanation)
Sets the body part corresponding to the notification explanation. |
void |
setExtensions(Collection<String> extensions)
Sets the list of extension fields. |
void |
setFailure(String failure)
Sets the value of the failure header. |
void |
setFinalRecipient(String recip)
Sets final recipient. |
void |
setGateway(MdnGateway gateway)
Sets the gateway that triggered this notification (optional). |
void |
setOriginalMessageId(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(String warning)
Sets the value of the warning header. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Notification(NotificationType notification)
notification - The notification disposition for this instance.public Notification(Disposition disposition)
Disposition
disposition - The notification disposition for this instance.| Method Detail |
|---|
public 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(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 String getOriginalMessageId()
public void setOriginalMessageId(String messageId)
messageId - The ID of the message that triggered this notificationpublic String getFinalRecipeint()
public void setFinalRecipient(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 String getError()
public void setError(String error)
error - The value of the error header.public void setWarning(String warning)
warning - The value of the warning header.public String getWarning()
public void setFailure(String failure)
failure - The value of the failure header.public String getFailure()
public void setExtensions(Collection<String> extensions)
failure - List of exentension values.public Collection<String> getExtensions()
public Collection<MimeEntity> getParts()
public javax.mail.internet.MimeMultipart getAsMultipart()
public byte[] serializeToBytes()
public InputStream getInputStream()
public String toString()
toString in class 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||