org.ow2.petals.bc.mail.listeners
Class ExternalListener
java.lang.Object
org.ow2.petals.component.framework.listener.AbstractListener
org.ow2.petals.component.framework.listener.AbstractExternalListener
org.ow2.petals.bc.mail.listeners.ExternalListener
public class ExternalListener
- extends org.ow2.petals.component.framework.listener.AbstractExternalListener
This class is used to manage listeners for external mail addresses registered
during SU deployments
- Author:
- Adrien LOUIS - EBMWebSourcing, ofabre - EBM Websourcing
| Fields inherited from class org.ow2.petals.component.framework.listener.AbstractListener |
component, factory, messageInterceptorProcessor |
|
Method Summary |
void |
init()
|
void |
process(javax.mail.Message message)
Send the message to the jbi service defined in the Consume node |
protected void |
setJBIContentAndAttachments(javax.mail.Part message,
org.ow2.petals.component.framework.api.message.Exchange exchange)
set the body and attachments from the mail Part to the jbi
exchange. |
protected void |
setProperties(javax.mail.Message message,
org.ow2.petals.component.framework.api.message.Exchange exchange)
Set ws addressing values : from, to, action(subject) |
void |
start()
|
void |
stop()
|
| Methods inherited from class org.ow2.petals.component.framework.listener.AbstractExternalListener |
createConsumeExchange |
| Methods inherited from class org.ow2.petals.component.framework.listener.AbstractListener |
createConsumeExchange, createConsumeExchange, createExchange, getComponent, getComponentContext, getConsumes, getCurrentTransaction, getExtensions, getInstallRoot, getLogger, getMessageInterceptorProcessor, getProvides, init, retrievePattern, send, sendAsync, sendSync, sendSync, setConsumes, setCurrentTransaction, setExtensions, setProvides |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extensions
protected org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions
mailSessionManager
protected MailSessionManager mailSessionManager
mimeMessageManager
protected MimeMessageManager mimeMessageManager
ExternalListener
public ExternalListener()
init
public void init()
- Overrides:
init in class org.ow2.petals.component.framework.listener.AbstractListener
process
public void process(javax.mail.Message message)
- Send the message to the jbi service defined in the Consume node
- Parameters:
message -
setJBIContentAndAttachments
protected void setJBIContentAndAttachments(javax.mail.Part message,
org.ow2.petals.component.framework.api.message.Exchange exchange)
throws java.io.IOException,
javax.mail.MessagingException,
javax.jbi.messaging.MessagingException,
org.ow2.petals.component.framework.api.exception.PEtALSCDKException
- set the body and attachments from the mail
Part to the jbi
exchange. If the given message Part is a Multipart, all
sub part are recursively processed.
- Parameters:
message - the mail Part to processexchange - the resulting jbi exchange
- Throws:
javax.mail.MessagingException
java.io.IOException
javax.jbi.messaging.MessagingException
org.ow2.petals.component.framework.api.exception.PEtALSCDKException
setProperties
protected void setProperties(javax.mail.Message message,
org.ow2.petals.component.framework.api.message.Exchange exchange)
throws javax.mail.MessagingException
- Set ws addressing values : from, to, action(subject)
- Parameters:
message - exchange -
- Throws:
javax.mail.MessagingException
start
public void start()
throws org.ow2.petals.component.framework.api.exception.PEtALSCDKException
- Specified by:
start in class org.ow2.petals.component.framework.listener.AbstractExternalListener
- Throws:
org.ow2.petals.component.framework.api.exception.PEtALSCDKException
stop
public void stop()
throws org.ow2.petals.component.framework.api.exception.PEtALSCDKException
- Specified by:
stop in class org.ow2.petals.component.framework.listener.AbstractExternalListener
- Throws:
org.ow2.petals.component.framework.api.exception.PEtALSCDKException
Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.