public class CamelMailetProcessor extends AbstractStateMailetProcessor implements org.apache.camel.CamelContextAware
AbstractStateMailetProcessor.MailetProcessorListener, AbstractStateMailetProcessor.TerminatingMailet| Constructor and Description |
|---|
CamelMailetProcessor() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.CamelContext |
getCamelContext() |
protected String |
getEndpoint()
Return the endpoint for the processorname.
|
void |
init()
Init the container
|
void |
service(org.apache.mailet.Mail mail)
Called by the mailet container to allow the mailet to process to a
message.
|
void |
setCamelContext(org.apache.camel.CamelContext context) |
protected void |
setupRouting(List<MatcherMailetPair> pairs)
Setup the routing for the configured
MatcherMailetPair's for this
CamelProcessor |
addListener, configure, destroy, getListeners, getLogger, getMailets, getMatchers, getState, removeListener, setLog, setMailetContext, setMailetLoader, setMatcherLoader, toProcessorpublic void service(org.apache.mailet.Mail mail)
throws javax.mail.MessagingException
MailProcessorCalled by the mailet container to allow the mailet to process to a message.
This method is only called after the mailet's init() method has completed successfully.
Mailets typically run inside multithreaded mailet containers that can handle multiple requests concurrently. Developers must be aware to synchronize access to any shared resources such as files, network connections, as well as the mailet's class and instance variables. More information on multithreaded programming in Java is available in the Java tutorial on multi-threaded programming.
service in interface MailProcessormail - - the Mail object that contains the message and routing
informationjavax.mail.MessagingException - - if a message or address parsing exception occurs or an
exception that interferes with the mailet's normal operationMailProcessor.service(org.apache.mailet.Mail)public org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwareCamelContextAware.getCamelContext()public void setCamelContext(org.apache.camel.CamelContext context)
setCamelContext in interface org.apache.camel.CamelContextAwareCamelContextAware.setCamelContext(org.apache.camel.CamelContext)protected String getEndpoint()
@PostConstruct public void init() throws Exception
AbstractStateMailetProcessorinit in class AbstractStateMailetProcessorExceptionprotected void setupRouting(List<MatcherMailetPair> pairs) throws javax.mail.MessagingException
AbstractStateMailetProcessorMatcherMailetPair's for this
CamelProcessorsetupRouting in class AbstractStateMailetProcessorjavax.mail.MessagingException(java.util.List)Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.