Class MailMessageHandler
- java.lang.Object
-
- com.flowable.platform.engine.impl.eventregistry.mail.MailMessageHandler
-
- All Implemented Interfaces:
MessageHandler
,ErrorHandler
public class MailMessageHandler extends Object implements MessageHandler, ErrorHandler
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DEFAULT_EVENT_KEY
protected String
eventKey
protected EventRegistry
eventRegistry
protected InboundEventTenantDetector<javax.mail.internet.MimeMessage>
eventTenantDetector
protected MailInboundChannelModel
inboundChannelModel
protected org.slf4j.Logger
logger
protected MessagePayloadExtractor
messagePayloadExtractor
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
-
Constructor Summary
Constructors Constructor Description MailMessageHandler(EventRegistry eventRegistry, com.fasterxml.jackson.databind.ObjectMapper objectMapper, MessagePayloadExtractor messagePayloadExtractor, MailInboundChannelModel inboundChannelModel, InboundEventTenantDetector<javax.mail.internet.MimeMessage> eventTenantDetector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<EventPayloadInstance>
extractPayload(MailInboundChannelModel inboundChannelModel, Object payload)
protected String
extractTenantId(Object payload)
EventRegistry
getEventRegistry()
MailInboundChannelModel
getInboundChannelModel()
void
handleError(Throwable throwable)
void
handleMessage(Message<?> message)
void
setEventRegistry(EventRegistry eventRegistry)
void
setInboundChannelModel(MailInboundChannelModel inboundChannelModel)
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
-
DEFAULT_EVENT_KEY
protected static final String DEFAULT_EVENT_KEY
- See Also:
- Constant Field Values
-
eventRegistry
protected EventRegistry eventRegistry
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
messagePayloadExtractor
protected MessagePayloadExtractor messagePayloadExtractor
-
inboundChannelModel
protected MailInboundChannelModel inboundChannelModel
-
eventTenantDetector
protected InboundEventTenantDetector<javax.mail.internet.MimeMessage> eventTenantDetector
-
eventKey
protected String eventKey
-
-
Constructor Detail
-
MailMessageHandler
public MailMessageHandler(EventRegistry eventRegistry, com.fasterxml.jackson.databind.ObjectMapper objectMapper, MessagePayloadExtractor messagePayloadExtractor, MailInboundChannelModel inboundChannelModel, InboundEventTenantDetector<javax.mail.internet.MimeMessage> eventTenantDetector)
-
-
Method Detail
-
handleError
public void handleError(Throwable throwable)
- Specified by:
handleError
in interfaceErrorHandler
-
handleMessage
public void handleMessage(Message<?> message) throws MessagingException
- Specified by:
handleMessage
in interfaceMessageHandler
- Throws:
MessagingException
-
extractPayload
protected Collection<EventPayloadInstance> extractPayload(MailInboundChannelModel inboundChannelModel, Object payload) throws javax.mail.MessagingException, IOException
- Throws:
javax.mail.MessagingException
IOException
-
getEventRegistry
public EventRegistry getEventRegistry()
-
setEventRegistry
public void setEventRegistry(EventRegistry eventRegistry)
-
getInboundChannelModel
public MailInboundChannelModel getInboundChannelModel()
-
setInboundChannelModel
public void setInboundChannelModel(MailInboundChannelModel inboundChannelModel)
-
-