org.apache.servicemix.components.email
Class MimeMailSender
java.lang.Object
org.apache.servicemix.jbi.management.BaseLifeCycle
org.apache.servicemix.components.util.PojoSupport
org.apache.servicemix.components.util.ComponentSupport
org.apache.servicemix.components.util.OutBinding
org.apache.servicemix.components.email.MimeMailSender
- All Implemented Interfaces:
- Runnable, javax.jbi.component.Component, javax.jbi.component.ComponentLifeCycle, javax.jbi.management.LifeCycleMBean, org.apache.servicemix.jbi.listener.MessageExchangeListener, MBeanInfoProvider
public class MimeMailSender
- extends OutBinding
An outbound component capable of sending MIME email via
JavaMail
- Version:
- $Revision: 2153 $
| Fields inherited from interface javax.jbi.management.LifeCycleMBean |
SHUTDOWN, STARTED, STOPPED, UNKNOWN |
|
Method Summary |
MimeMailMarshaler |
getMarshaler()
|
org.springframework.mail.javamail.JavaMailSender |
getSender()
|
protected void |
init()
A helper method to allow a component to initialise prior to the endpoint being activated
but after the component context has been configured. |
protected void |
process(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
Process incoming exchange. |
void |
setMarshaler(MimeMailMarshaler marshaler)
|
void |
setSender(org.springframework.mail.javamail.JavaMailSender sender)
|
| Methods inherited from class org.apache.servicemix.components.util.ComponentSupport |
createComponentLifeCycle, createInOnlyExchange, createInOnlyExchange, createInOnlyExchange, createInOptionalOutExchange, createInOutExchange, createInOutExchange, createRobustInOnlyExchange, createServiceUnitManager, creatInOutExchange, forwardToExchange, forwardToExchange, getInMessage, getLifeCycle, getMessageTransformer, getServiceDescription, getServiceUnitManager, initializeServiceUnitManager, invoke, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, propagateCorrelationId, resolveEndpointReference, setMessageTransformer |
| Methods inherited from class org.apache.servicemix.components.util.PojoSupport |
answer, done, fail, fail, getBody, getContext, getDeliveryChannel, getDescription, getEndpoint, getExchangeFactory, getExtensionMBeanName, getService, init, isInAndOut, send, sendSync, sendSync, setBody, setEndpoint, setExtensionMBeanName, setService |
| Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle |
firePropertyChanged, getAttributeInfos, getCurrentState, getName, getObjectToManage, getOperationInfos, getSubType, getType, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MimeMailSender
public MimeMailSender()
getSender
public org.springframework.mail.javamail.JavaMailSender getSender()
setSender
public void setSender(org.springframework.mail.javamail.JavaMailSender sender)
getMarshaler
public MimeMailMarshaler getMarshaler()
setMarshaler
public void setMarshaler(MimeMailMarshaler marshaler)
init
protected void init()
throws javax.jbi.JBIException
- Description copied from class:
PojoSupport
- A helper method to allow a component to initialise prior to the endpoint being activated
but after the component context has been configured.
- Overrides:
init in class PojoSupport
- Throws:
javax.jbi.JBIException
process
protected void process(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
throws Exception
- Description copied from class:
OutBinding
- Process incoming exchange.
The exchange is in the ACTIVE state.
The method should end by a call to done() or answer().
When an exception is thrown, the fail() method will be called.
- Specified by:
process in class OutBinding
- Parameters:
exchange - the exchange to processmessage - the input message of the exchange
- Throws:
Exception - if an error occurs
Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.