Package org.apache.axis2.transport.mail
Class MailTransportSender
- java.lang.Object
-
- org.apache.axis2.handlers.AbstractHandler
-
- org.apache.axis2.transport.base.AbstractTransportSender
-
- org.apache.axis2.transport.mail.MailTransportSender
-
- All Implemented Interfaces:
Handler
,TransportSender
,ManagementSupport
public class MailTransportSender extends AbstractTransportSender implements ManagementSupport
The mail transport sender sends mail using an SMTP server configuration defined in the axis2.xml's transport sender definition
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler
Handler.InvocationResponse
-
-
Field Summary
-
Fields inherited from class org.apache.axis2.transport.base.AbstractTransportSender
cfgCtx, log, metrics
-
Fields inherited from class org.apache.axis2.handlers.AbstractHandler
handlerDesc
-
-
Constructor Summary
Constructors Constructor Description MailTransportSender()
The public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(ConfigurationContext cfgCtx, TransportOutDescription transportOut)
Initialize the Mail sender and be ready to send messagesvoid
sendMessage(MessageContext msgCtx, String targetAddress, OutTransportInfo outTransportInfo)
Send the given message over the Mail transportvoid
stop()
-
Methods inherited from class org.apache.axis2.transport.base.AbstractTransportSender
cleanup, createResponseMessageContext, getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getTimeoutsReceiving, getTimeoutsSending, getTransportName, handleException, handleException, handleIncomingMessage, invoke, logException, maintenenceShutdown, pause, resetStatistics, resume, waitForSynchronousResponse
-
Methods inherited from class org.apache.axis2.handlers.AbstractHandler
flowComplete, getHandlerDesc, getName, getParameter, init, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.axis2.engine.Handler
flowComplete, getHandlerDesc, getName, getParameter, init
-
Methods inherited from interface org.apache.axis2.transport.base.ManagementSupport
getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getTimeoutsReceiving, getTimeoutsSending, maintenenceShutdown, pause, resetStatistics, resume
-
-
-
-
Method Detail
-
init
public void init(ConfigurationContext cfgCtx, TransportOutDescription transportOut) throws AxisFault
Initialize the Mail sender and be ready to send messages- Specified by:
init
in interfaceTransportSender
- Overrides:
init
in classAbstractTransportSender
- Parameters:
cfgCtx
- the axis2 configuration contexttransportOut
- the transport-out description- Throws:
AxisFault
- on error
-
sendMessage
public void sendMessage(MessageContext msgCtx, String targetAddress, OutTransportInfo outTransportInfo) throws AxisFault
Send the given message over the Mail transport- Specified by:
sendMessage
in classAbstractTransportSender
- Parameters:
msgCtx
- the axis2 message context- Throws:
AxisFault
- on error
-
stop
public void stop()
- Specified by:
stop
in interfaceTransportSender
- Overrides:
stop
in classAbstractTransportSender
-
-