public abstract class AbstractStateMailetProcessor extends Object implements MailProcessor, Configurable, LogEnabled
MailProcessor implementations which want to
process Mail via Matcher and Mailet| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractStateMailetProcessor.MailetProcessorListener
A Listener which will get notified after
Mailet.service(org.apache.mailet.Mail) and
Matcher.match(org.apache.mailet.Mail) methods are called from the
container |
class |
AbstractStateMailetProcessor.TerminatingMailet
Mailet which protect us to not fall into an endless loop caused by an
configuration error
|
| Constructor and Description |
|---|
AbstractStateMailetProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(AbstractStateMailetProcessor.MailetProcessorListener listener) |
void |
configure(org.apache.commons.configuration.HierarchicalConfiguration config)
Configure the object.
|
void |
destroy()
Destroy the container
|
List<AbstractStateMailetProcessor.MailetProcessorListener> |
getListeners() |
protected org.slf4j.Logger |
getLogger() |
List<org.apache.mailet.Mailet> |
getMailets()
Return a unmodifiable
List of the configured Mailet's |
List<org.apache.mailet.Matcher> |
getMatchers()
Return a unmodifiable
List of the configured Matcher's |
protected String |
getState() |
void |
init()
Init the container
|
void |
removeListener(AbstractStateMailetProcessor.MailetProcessorListener listener) |
void |
setLog(org.slf4j.Logger log)
Sets the service log.
|
void |
setMailetContext(org.apache.mailet.MailetContext mailetContext) |
void |
setMailetLoader(MailetLoader mailetLoader) |
void |
setMatcherLoader(MatcherLoader matcherLoader) |
protected abstract void |
setupRouting(List<MatcherMailetPair> pairs)
Setup the routing for the configured
MatcherMailetPair's for this
CamelProcessor |
protected void |
toProcessor(org.apache.mailet.Mail mail)
Hand the mail over to another processor
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitservicepublic void setMatcherLoader(MatcherLoader matcherLoader)
public void setMailetContext(org.apache.mailet.MailetContext mailetContext)
public void setMailetLoader(MailetLoader mailetLoader)
public void setLog(org.slf4j.Logger log)
LogEnabledsetLog in interface LogEnabledlog - not nullLogEnabled.setLog(org.slf4j.Logger)public void configure(org.apache.commons.configuration.HierarchicalConfiguration config)
throws org.apache.commons.configuration.ConfigurationException
Configurableconfigure in interface Configurableorg.apache.commons.configuration.ConfigurationExceptionConfigurable.configure(org.apache.commons.configuration.HierarchicalConfiguration)@PostConstruct public void init() throws Exception
Exception@PreDestroy public void destroy()
protected void toProcessor(org.apache.mailet.Mail mail)
throws javax.mail.MessagingException
mail - javax.mail.MessagingExceptionprotected org.slf4j.Logger getLogger()
protected String getState()
public List<org.apache.mailet.Mailet> getMailets()
List of the configured Mailet'spublic List<org.apache.mailet.Matcher> getMatchers()
List of the configured Matcher'spublic void addListener(AbstractStateMailetProcessor.MailetProcessorListener listener)
public void removeListener(AbstractStateMailetProcessor.MailetProcessorListener listener)
public List<AbstractStateMailetProcessor.MailetProcessorListener> getListeners()
protected abstract void setupRouting(List<MatcherMailetPair> pairs) throws javax.mail.MessagingException
MatcherMailetPair's for this
CamelProcessorjavax.mail.MessagingExceptionCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.