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, wait
service
public void setMatcherLoader(MatcherLoader matcherLoader)
public void setMailetContext(org.apache.mailet.MailetContext mailetContext)
public void setMailetLoader(MailetLoader mailetLoader)
public void setLog(org.slf4j.Logger log)
LogEnabled
setLog
in interface LogEnabled
log
- not nullLogEnabled.setLog(org.slf4j.Logger)
public void configure(org.apache.commons.configuration.HierarchicalConfiguration config) throws org.apache.commons.configuration.ConfigurationException
Configurable
configure
in interface Configurable
org.apache.commons.configuration.ConfigurationException
Configurable.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.MessagingException
protected 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
CamelProcessor
javax.mail.MessagingException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.