org.mule.transport.ftp
Class FtpMessageReceiver
java.lang.Object
org.mule.transport.AbstractConnectable
org.mule.transport.AbstractMessageReceiver
org.mule.transport.AbstractPollingMessageReceiver
org.mule.transport.ftp.FtpMessageReceiver
- All Implemented Interfaces:
- ExceptionListener, Disposable, Initialisable, Startable, Stoppable, Connectable, MessageReceiver
public class FtpMessageReceiver
- extends AbstractPollingMessageReceiver
Methods inherited from class org.mule.transport.AbstractMessageReceiver |
dispose, getConnectEventId, getConnectionDescription, getEndpoint, getEndpointURI, getListener, getReceiverKey, getService, getWorkManager, handleUnacceptedFilter, initialise, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, setEndpoint, setExceptionDetails, setListener, setReceiverKey, setService, toString |
Methods inherited from class org.mule.transport.AbstractConnectable |
activate, connect, disconnect, disposeAndLogException, doInitialise, exceptionThrown, getConnectEventId, getConnector, handleException, isConnected, isDoThreading, isStarted, passivate, setEndpoint, start, stop, validate |
Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
connector
protected final FtpConnector connector
filenameFilter
protected final FilenameFilter filenameFilter
scheduledFiles
protected final Set<String> scheduledFiles
currentFiles
protected final Set<String> currentFiles
FtpMessageReceiver
public FtpMessageReceiver(Connector connector,
Service service,
InboundEndpoint endpoint,
long frequency)
throws CreateException
- Throws:
CreateException
poll
public void poll()
throws Exception
- Specified by:
poll
in class AbstractPollingMessageReceiver
- Throws:
Exception
listFiles
protected org.apache.commons.net.ftp.FTPFile[] listFiles()
throws Exception
- Throws:
Exception
processFile
protected void processFile(org.apache.commons.net.ftp.FTPFile file)
throws Exception
- Throws:
Exception
postProcess
protected void postProcess(org.apache.commons.net.ftp.FTPClient client,
org.apache.commons.net.ftp.FTPFile file,
MuleMessage message)
throws Exception
- Throws:
Exception
doConnect
protected void doConnect()
throws Exception
- Overrides:
doConnect
in class AbstractConnectable
- Throws:
Exception
validateConnection
public RetryContext validateConnection(RetryContext retryContext)
- Description copied from interface:
Connectable
- Test whether the connector is able to connect to its resource(s).
This will allow a retry policy to go into effect in the case of failure. Implementations must
call either:
Callers should then check for
RetryContext.isOk()
. The failure, if any, will be
provided via the RetryContext.getLastFailure()
.
- Specified by:
validateConnection
in interface Connectable
- Overrides:
validateConnection
in class AbstractConnectable
- Returns:
- same retry context with status info set and any failures populated
doDisconnect
protected void doDisconnect()
throws Exception
- Overrides:
doDisconnect
in class AbstractConnectable
- Throws:
Exception
doDispose
protected void doDispose()
- Overrides:
doDispose
in class AbstractConnectable
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.