public class DefaultMessagePayloadExtractor extends Object implements MessagePayloadExtractor
| Modifier and Type | Field and Description |
|---|---|
protected static Collection<String> |
KNOWN_HEADERS |
protected org.slf4j.Logger |
logger |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
ATTACHMENTS, BCC, CC, CONTENT, CONTENT_HTML, CUSTOM_HEADERS, FROM, RAW_MAIL_BYTES, RECEIVED_DATE, SENT_DATE, SUBJECT, SUBJECT_CORRELATION, TO| Constructor and Description |
|---|
DefaultMessagePayloadExtractor(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
encodeDataSourceToString(DataSource dataSource) |
protected com.fasterxml.jackson.databind.node.ArrayNode |
extractAttachments(List<DataSource> attachments) |
protected com.fasterxml.jackson.databind.node.ObjectNode |
extractCustomHeaders(javax.mail.Message message) |
protected String |
extractDate(Date date) |
Collection<EventPayloadInstance> |
extractPayload(MailInboundChannelModel inboundChannelModel,
javax.mail.internet.MimeMessage message) |
protected String |
extractRawMailBytes(javax.mail.Message message) |
protected com.fasterxml.jackson.databind.node.ArrayNode |
extractRecipients(javax.mail.Message message,
javax.mail.Message.RecipientType recipientType) |
protected String |
extractSubjectCorrelation(MailInboundChannelModel inboundChannelModel,
String subject) |
protected final org.slf4j.Logger logger
protected static final Collection<String> KNOWN_HEADERS
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
public DefaultMessagePayloadExtractor(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public Collection<EventPayloadInstance> extractPayload(MailInboundChannelModel inboundChannelModel, javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
extractPayload in interface MessagePayloadExtractorjavax.mail.MessagingExceptionprotected String extractSubjectCorrelation(MailInboundChannelModel inboundChannelModel, String subject)
protected com.fasterxml.jackson.databind.node.ArrayNode extractAttachments(List<DataSource> attachments) throws IOException
IOExceptionprotected String encodeDataSourceToString(DataSource dataSource) throws IOException
IOExceptionprotected com.fasterxml.jackson.databind.node.ArrayNode extractRecipients(javax.mail.Message message,
javax.mail.Message.RecipientType recipientType)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionprotected com.fasterxml.jackson.databind.node.ObjectNode extractCustomHeaders(javax.mail.Message message)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionprotected String extractRawMailBytes(javax.mail.Message message) throws IOException, javax.mail.MessagingException
IOExceptionjavax.mail.MessagingException