org.apache.axis2.transport.mail
Class MailTransportListener
java.lang.Object
org.apache.axis2.transport.base.AbstractTransportListener
org.apache.axis2.transport.base.AbstractTransportListenerEx<T>
org.apache.axis2.transport.base.AbstractPollingTransportListener<PollTableEntry>
org.apache.axis2.transport.mail.MailTransportListener
- All Implemented Interfaces:
- TransportErrorSource, ManagementSupport, org.apache.axis2.transport.TransportListener
public class MailTransportListener
- extends AbstractPollingTransportListener<PollTableEntry>
- implements ManagementSupport, TransportErrorSource
This mail transport lister implementation uses the base transport framework and is a polling
transport. i.e. a service can register itself with custom a custom mail configuration (i.e.
pop3 or imap) and specify its polling duration, and what action to be taken after processing
messages. The transport always deletes processed mails from the folder they were fetched from
and can be configured to be optionally moved to a different folder, if the server supports it
(e.g. with imap). When checking for new mail, the transport ignores messages already flaged as
SEEN and DELETED
Field Summary |
static java.lang.String |
DELETE
|
static java.lang.String |
MOVE
|
Fields inherited from interface org.apache.axis2.transport.TransportListener |
HOST_ADDRESS, PARAM_PORT |
Methods inherited from class org.apache.axis2.transport.base.AbstractTransportListener |
createMessageContext, disableTransportForService, getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getConfigurationContext, getEPRForService, getEPRsForService, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsCollector, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getSessionContext, getTimeoutsReceiving, getTimeoutsSending, getTransportName, handleException, handleIncomingMessage, logException, resetStatistics, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 |
DELETE
public static final java.lang.String DELETE
- See Also:
- Constant Field Values
MOVE
public static final java.lang.String MOVE
- See Also:
- Constant Field Values
MailTransportListener
public MailTransportListener()
init
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx,
org.apache.axis2.description.TransportInDescription trpInDesc)
throws org.apache.axis2.AxisFault
- Initializes the Mail transport
- Specified by:
init
in interface org.apache.axis2.transport.TransportListener
- Overrides:
init
in class AbstractPollingTransportListener<PollTableEntry>
- Parameters:
cfgCtx
- the Axsi2 configuration contexttrpInDesc
- the POP3 transport in description from the axis2.xml
- Throws:
org.apache.axis2.AxisFault
- on error
poll
protected void poll(PollTableEntry entry)
- Specified by:
poll
in class AbstractPollingTransportListener<PollTableEntry>
createEndpoint
protected PollTableEntry createEndpoint()
- Specified by:
createEndpoint
in class AbstractTransportListenerEx<PollTableEntry>
addErrorListener
public void addErrorListener(TransportErrorListener listener)
- Specified by:
addErrorListener
in interface TransportErrorSource
removeErrorListener
public void removeErrorListener(TransportErrorListener listener)
- Specified by:
removeErrorListener
in interface TransportErrorSource
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.