- java.lang.Object
-
- org.eclipse.angus.mail.dsn.Report
-
- org.eclipse.angus.mail.dsn.DeliveryStatus
-
-
Field Summary
Fields Modifier and Type Field Description protected InternetHeadersmessageDSNThe DSN fields for the message.protected InternetHeaders[]recipientDSNThe DSN fields for each recipient.
-
Constructor Summary
Constructors Constructor Description DeliveryStatus()Construct a delivery status notification with no content.DeliveryStatus(java.io.InputStream is)Construct a delivery status notification by parsing the supplied input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRecipientDSN(InternetHeaders h)Add deliver status notification information for another recipient.InternetHeadersgetMessageDSN()Return all the per-message fields in the delivery status notification.InternetHeadersgetRecipientDSN(int n)Return the delivery status notification information for the specified recipient.intgetRecipientDSNCount()Return the number of recipients for which we have per-recipient delivery status notification information.voidsetMessageDSN(InternetHeaders messageDSN)Set the per-message fields in the delivery status notification.java.lang.StringtoString()voidwriteTo(java.io.OutputStream os)
-
-
-
Field Detail
-
messageDSN
protected InternetHeaders messageDSN
The DSN fields for the message.
-
recipientDSN
protected InternetHeaders[] recipientDSN
The DSN fields for each recipient.
-
-
Constructor Detail
-
DeliveryStatus
public DeliveryStatus() throws MessagingExceptionConstruct a delivery status notification with no content.- Throws:
MessagingException- for failures
-
DeliveryStatus
public DeliveryStatus(java.io.InputStream is) throws MessagingException, java.io.IOExceptionConstruct a delivery status notification by parsing the supplied input stream.- Parameters:
is- the input stream- Throws:
java.io.IOException- for I/O errors reading the streamMessagingException- for other failures
-
-
Method Detail
-
getMessageDSN
public InternetHeaders getMessageDSN()
Return all the per-message fields in the delivery status notification. The fields are defined as:per-message-fields = [ original-envelope-id-field CRLF ] reporting-mta-field CRLF [ dsn-gateway-field CRLF ] [ received-from-mta-field CRLF ] [ arrival-date-field CRLF ] *( extension-field CRLF )- Returns:
- the per-message DSN fields
-
setMessageDSN
public void setMessageDSN(InternetHeaders messageDSN)
Set the per-message fields in the delivery status notification.- Parameters:
messageDSN- the per-message DSN fields
-
getRecipientDSNCount
public int getRecipientDSNCount()
Return the number of recipients for which we have per-recipient delivery status notification information.- Returns:
- the number of recipients
-
getRecipientDSN
public InternetHeaders getRecipientDSN(int n)
Return the delivery status notification information for the specified recipient.- Parameters:
n- the recipient number- Returns:
- the DSN fields for the recipient
-
addRecipientDSN
public void addRecipientDSN(InternetHeaders h)
Add deliver status notification information for another recipient.- Parameters:
h- the DSN fields for the recipient
-
writeTo
public void writeTo(java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-