org.nhindirect.stagent.mail.notifications
Class NotificationMessage

java.lang.Object
  extended by javax.mail.Message
      extended by javax.mail.internet.MimeMessage
          extended by org.nhindirect.stagent.mail.Message
              extended by org.nhindirect.stagent.mail.notifications.NotificationMessage
All Implemented Interfaces:
javax.mail.internet.MimePart, javax.mail.Part

public class NotificationMessage
extends Message

Represents a message disposition notification (MDN) sent to a message sender, as per RFC 3798

Author:
Greg Meyer, Umesh Madan

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage
javax.mail.internet.MimeMessage.RecipientType
 
Field Summary
 
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
NotificationMessage(String to, Notification notification)
          Initializes an MDN to the specified recipient.
NotificationMessage(String to, String from, Notification notification)
          Initializes an MDN to the specified recipient.
 
Method Summary
static NotificationMessage createNotificationFor(Message message, Notification notification)
          Takes a message and constructs an MDN.
 
Methods inherited from class org.nhindirect.stagent.mail.Message
extractEntityForSignature, extractMimeEntity, getBCCHeader, getCCHeader, getContentAsBytes, getDateHeader, getFromHeader, getIDHeader, getSubjectHeader, getToHeader, toString
 
Methods inherited from class javax.mail.internet.MimeMessage
addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, removeHeader, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFlags, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, writeTo, writeTo
 
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setFlag, setRecipient
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotificationMessage

public NotificationMessage(String to,
                           Notification notification)
                    throws javax.mail.MessagingException
Initializes an MDN to the specified recipient.

Parameters:
to - The MDN recipient.
notification - The notification to send.
Throws:
javax.mail.MessagingException

NotificationMessage

public NotificationMessage(String to,
                           String from,
                           Notification notification)
                    throws javax.mail.MessagingException
Initializes an MDN to the specified recipient.

Parameters:
to - The MDN recipient.
from - The original message receiver who is sending the MDN
notification - The notification to send.
Throws:
javax.mail.MessagingException
Method Detail

createNotificationFor

public static NotificationMessage createNotificationFor(Message message,
                                                        Notification notification)
Takes a message and constructs an MDN.

Parameters:
message - The message to send notification about.
notification - The notification to create.
Returns:
The MDN.


Copyright © 2010-2014 NHIN Direct. All Rights Reserved.