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 MessagePayloadExtractor
javax.mail.MessagingException
protected String extractSubjectCorrelation(MailInboundChannelModel inboundChannelModel, String subject)
protected com.fasterxml.jackson.databind.node.ArrayNode extractAttachments(List<DataSource> attachments) throws IOException
IOException
protected String encodeDataSourceToString(DataSource dataSource) throws IOException
IOException
protected com.fasterxml.jackson.databind.node.ArrayNode extractRecipients(javax.mail.Message message, javax.mail.Message.RecipientType recipientType) throws javax.mail.MessagingException
javax.mail.MessagingException
protected com.fasterxml.jackson.databind.node.ObjectNode extractCustomHeaders(javax.mail.Message message) throws javax.mail.MessagingException
javax.mail.MessagingException
protected String extractRawMailBytes(javax.mail.Message message) throws IOException, javax.mail.MessagingException
IOException
javax.mail.MessagingException