public interface MailMessageHandler
MailMessageHandler - This interface declares the handleXXX methods which are invoked by the
MailMessageParser instance on certain parts of a message.
Each methods returns a boolean value which indicates whether the underlying MailMessageParser instance should proceed or quit
message parsing after method invocation.
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleAttachment(MailPart part,
boolean isInline,
java.lang.String baseContentType,
java.lang.String fileName,
java.lang.String id)
Handle an attachment part (any non-inline parts and file attachments)
|
boolean |
handleBccRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
Handle the 'Bcc' recipient message header
|
boolean |
handleCcRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
Handle the 'Cc' recipient message header
|
boolean |
handleColorLabel(int colorLabel)
Handle message's color label
|
boolean |
handleContentId(java.lang.String contentId)
Handle content id
|
boolean |
handleDispositionNotification(javax.mail.internet.InternetAddress dispositionNotificationTo,
boolean seen)
Handle message's disposition notification
|
boolean |
handleFrom(javax.mail.internet.InternetAddress[] fromAddrs)
Handle the 'From' message header
|
boolean |
handleHeaders(int size,
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> iter)
Handle those message headers which cannot be handled through a
handleXXX method |
boolean |
handleImagePart(MailPart part,
java.lang.String imageCID,
java.lang.String baseContentType,
boolean isInline,
java.lang.String fileName,
java.lang.String id)
Handle an image part (
image/*) |
boolean |
handleInlineHtml(java.lang.String htmlContent,
ContentType contentType,
long size,
java.lang.String fileName,
java.lang.String id)
Handle a html inline part (
text/html) |
boolean |
handleInlinePlainText(java.lang.String plainTextContent,
ContentType contentType,
long size,
java.lang.String fileName,
java.lang.String id)
Handle a plain text inline part (either
text/plain or text/enriched) |
boolean |
handleInlineUUEncodedAttachment(UUEncodedPart part,
java.lang.String id)
Handle a UUEncoded file attachment inline part
|
boolean |
handleInlineUUEncodedPlainText(java.lang.String decodedTextContent,
ContentType contentType,
int size,
java.lang.String fileName,
java.lang.String id)
Handle a UUEncoded plain text inline part
|
void |
handleMessageEnd(MailMessage mail)
Perform some optional finishing operations
|
boolean |
handleMsgRef(java.lang.String msgRef)
Handle referenced mail
|
boolean |
handleMultipart(MailPart mp,
int bodyPartCount,
java.lang.String id)
Handle a multipart (
multipart/*) |
boolean |
handleMultipartEnd(MailPart mp,
java.lang.String id)
Handle end of a multipart (
multipart/*) |
boolean |
handleNestedMessage(MailPart mailPart,
java.lang.String id)
Handle a nested message (
message/rfc822)
Get the message via:
MailMessage nestedMail = (MailMessage) mailPart.getContent();
|
boolean |
handlePriority(int priority)
Handle message's priority
|
boolean |
handleReceivedDate(java.util.Date receivedDate)
Handle message's received date
|
boolean |
handleSentDate(java.util.Date sentDate)
Handle message's sent date
|
boolean |
handleSpecialPart(MailPart part,
java.lang.String baseContentType,
java.lang.String fileName,
java.lang.String id)
Handle special parts.
|
boolean |
handleSubject(java.lang.String subject)
Handle message's subject
|
boolean |
handleSystemFlags(int flags)
Handle message's system flags (//SEEN, //ANSWERED, ...)
|
boolean |
handleToRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
Handle the 'To' recipient message header
|
boolean |
handleUserFlags(java.lang.String[] userFlags)
Handle message's user flags
|
boolean handleFrom(javax.mail.internet.InternetAddress[] fromAddrs)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleToRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleCcRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleBccRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleSubject(java.lang.String subject)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleSentDate(java.util.Date sentDate)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleReceivedDate(java.util.Date receivedDate)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleHeaders(int size,
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> iter)
throws com.openexchange.exception.OXException
handleXXX methodsize - The iterator's size or -1 to use Iterator.hasNext() insteaditer - The header iteratortrue to continue parsing; otherwise falsecom.openexchange.exception.OXExceptionboolean handlePriority(int priority)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleMsgRef(java.lang.String msgRef)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleDispositionNotification(javax.mail.internet.InternetAddress dispositionNotificationTo,
boolean seen)
throws com.openexchange.exception.OXException
seen - TODOcom.openexchange.exception.OXExceptionboolean handleContentId(java.lang.String contentId)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleSystemFlags(int flags)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleUserFlags(java.lang.String[] userFlags)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleColorLabel(int colorLabel)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleInlinePlainText(java.lang.String plainTextContent,
ContentType contentType,
long size,
java.lang.String fileName,
java.lang.String id)
throws com.openexchange.exception.OXException
text/plain or text/enriched)com.openexchange.exception.OXExceptionboolean handleInlineUUEncodedPlainText(java.lang.String decodedTextContent,
ContentType contentType,
int size,
java.lang.String fileName,
java.lang.String id)
throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleInlineUUEncodedAttachment(UUEncodedPart part, java.lang.String id) throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleInlineHtml(java.lang.String htmlContent,
ContentType contentType,
long size,
java.lang.String fileName,
java.lang.String id)
throws com.openexchange.exception.OXException
text/html)com.openexchange.exception.OXExceptionboolean handleAttachment(MailPart part, boolean isInline, java.lang.String baseContentType, java.lang.String fileName, java.lang.String id) throws com.openexchange.exception.OXException
com.openexchange.exception.OXExceptionboolean handleSpecialPart(MailPart part, java.lang.String baseContentType, java.lang.String fileName, java.lang.String id) throws com.openexchange.exception.OXException
message/delivery-status,
message/disposition-notification, text/rfc822-headers, text/x-vcard, text/vcard,
text/calendar or text/x-vCalendarcom.openexchange.exception.OXExceptionboolean handleImagePart(MailPart part, java.lang.String imageCID, java.lang.String baseContentType, boolean isInline, java.lang.String fileName, java.lang.String id) throws com.openexchange.exception.OXException
image/*)com.openexchange.exception.OXExceptionboolean handleMultipart(MailPart mp, int bodyPartCount, java.lang.String id) throws com.openexchange.exception.OXException
multipart/*)com.openexchange.exception.OXExceptionboolean handleMultipartEnd(MailPart mp, java.lang.String id) throws com.openexchange.exception.OXException
multipart/*)com.openexchange.exception.OXExceptionboolean handleNestedMessage(MailPart mailPart, java.lang.String id) throws com.openexchange.exception.OXException
message/rfc822)
Get the message via:
MailMessage nestedMail = (MailMessage) mailPart.getContent();
com.openexchange.exception.OXExceptionvoid handleMessageEnd(MailMessage mail) throws com.openexchange.exception.OXException
com.openexchange.exception.OXException