|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
| Method Summary | |
|---|---|
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 |
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 |
| Method Detail |
|---|
boolean handleFrom(javax.mail.internet.InternetAddress[] fromAddrs)
throws MailException
MailException
boolean handleToRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
throws MailException
MailException
boolean handleCcRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
throws MailException
MailException
boolean handleBccRecipient(javax.mail.internet.InternetAddress[] recipientAddrs)
throws MailException
MailException
boolean handleSubject(java.lang.String subject)
throws MailException
MailException
boolean handleSentDate(java.util.Date sentDate)
throws MailException
MailException
boolean handleReceivedDate(java.util.Date receivedDate)
throws MailException
MailException
boolean handleHeaders(int size,
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> iter)
throws MailException
handleXXX method
size - The iterator's size or -1 to use Iterator.hasNext() insteaditer - The header iterator
true to continue parsing; otherwise false
MailException
boolean handlePriority(int priority)
throws MailException
MailException
boolean handleMsgRef(java.lang.String msgRef)
throws MailException
MailException
boolean handleDispositionNotification(javax.mail.internet.InternetAddress dispositionNotificationTo,
boolean seen)
throws MailException
seen - TODO
MailException
boolean handleContentId(java.lang.String contentId)
throws MailException
MailException
boolean handleSystemFlags(int flags)
throws MailException
MailException
boolean handleUserFlags(java.lang.String[] userFlags)
throws MailException
MailException
boolean handleColorLabel(int colorLabel)
throws MailException
MailException
boolean handleInlinePlainText(java.lang.String plainTextContent,
ContentType contentType,
long size,
java.lang.String fileName,
java.lang.String id)
throws MailException
text/plain or text/enriched)
MailException
boolean handleInlineUUEncodedPlainText(java.lang.String decodedTextContent,
ContentType contentType,
int size,
java.lang.String fileName,
java.lang.String id)
throws MailException
MailException
boolean handleInlineUUEncodedAttachment(UUEncodedPart part,
java.lang.String id)
throws MailException
MailException
boolean handleInlineHtml(java.lang.String htmlContent,
ContentType contentType,
long size,
java.lang.String fileName,
java.lang.String id)
throws MailException
text/html)
MailException
boolean handleAttachment(MailPart part,
boolean isInline,
java.lang.String baseContentType,
java.lang.String fileName,
java.lang.String id)
throws MailException
MailException
boolean handleSpecialPart(MailPart part,
java.lang.String baseContentType,
java.lang.String fileName,
java.lang.String id)
throws MailException
message/delivery-status,
message/disposition-notification, text/rfc822-headers, text/x-vcard, text/vcard,
text/calendar or text/x-vCalendar
MailException
boolean handleImagePart(MailPart part,
java.lang.String imageCID,
java.lang.String baseContentType,
boolean isInline,
java.lang.String fileName,
java.lang.String id)
throws MailException
image/*)
MailException
boolean handleMultipart(MailPart mp,
int bodyPartCount,
java.lang.String id)
throws MailException
multipart/*)
MailException
boolean handleNestedMessage(MailPart mailPart,
java.lang.String id)
throws MailException
message/rfc822)
Get the message via:
MailMessage nestedMail = (MailMessage) mailPart.getContent();
MailException
void handleMessageEnd(MailMessage mail)
throws MailException
MailException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||