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, toProcessor
public void service(org.apache.mailet.Mail mail) throws javax.mail.MessagingException
MailProcessor
Called 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 MailProcessor
mail
- - 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.CamelContextAware
CamelContextAware.getCamelContext()
public void setCamelContext(org.apache.camel.CamelContext context)
setCamelContext
in interface org.apache.camel.CamelContextAware
CamelContextAware.setCamelContext(org.apache.camel.CamelContext)
protected String getEndpoint()
@PostConstruct public void init() throws Exception
AbstractStateMailetProcessor
init
in class AbstractStateMailetProcessor
Exception
protected void setupRouting(List<MatcherMailetPair> pairs) throws javax.mail.MessagingException
AbstractStateMailetProcessor
MatcherMailetPair
's for this
CamelProcessor
setupRouting
in class AbstractStateMailetProcessor
javax.mail.MessagingException
(java.util.List)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.