org.mule.transport.ftp
Class FtpMessageReceiver

java.lang.Object
  extended by org.mule.transport.AbstractMessageReceiver
      extended by org.mule.transport.AbstractPollingMessageReceiver
          extended by org.mule.transport.ftp.FtpMessageReceiver
All Implemented Interfaces:
Disposable, Initialisable, Lifecycle, Startable, Stoppable, Connectable, MessageReceiver

public class FtpMessageReceiver
extends AbstractPollingMessageReceiver


Field Summary
protected  FtpConnector connector
           
protected  Set currentFiles
           
protected  FilenameFilter filenameFilter
           
protected  Set scheduledFiles
           
 
Fields inherited from class org.mule.transport.AbstractPollingMessageReceiver
DEFAULT_POLL_FREQUENCY, DEFAULT_POLL_TIMEUNIT, DEFAULT_STARTUP_DELAY, schedules
 
Fields inherited from class org.mule.transport.AbstractMessageReceiver
connected, connecting, connectionStrategy, disposing, endpoint, logger, receiverKey, responseEndpoint, service, stopped
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
FtpMessageReceiver(Connector connector, Service service, InboundEndpoint endpoint, long frequency)
           
 
Method Summary
protected  void doConnect()
           
protected  void doDisconnect()
           
protected  void doDispose()
           
protected  org.apache.commons.net.ftp.FTPFile[] listFiles()
           
 void poll()
           
protected  void postProcess(org.apache.commons.net.ftp.FTPClient client, org.apache.commons.net.ftp.FTPFile file, MuleMessage message)
           
protected  void processFile(org.apache.commons.net.ftp.FTPFile file)
           
 
Methods inherited from class org.mule.transport.AbstractPollingMessageReceiver
createWork, doStart, doStop, getFrequency, getTimeUnit, schedule, setFrequency, setTimeUnit, unschedule
 
Methods inherited from class org.mule.transport.AbstractMessageReceiver
connect, disconnect, dispose, doInitialise, getConnectEventId, getConnectionDescription, getConnector, getEndpoint, getEndpointURI, getListener, getReceiverKey, getService, getWorkManager, handleException, handleUnacceptedFilter, initialise, isConnected, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, setConnector, setEndpoint, setExceptionDetails, setListener, setReceiverKey, setService, setWorkManager, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

connector

protected final FtpConnector connector

filenameFilter

protected final FilenameFilter filenameFilter

scheduledFiles

protected final Set scheduledFiles

currentFiles

protected final Set currentFiles
Constructor Detail

FtpMessageReceiver

public FtpMessageReceiver(Connector connector,
                          Service service,
                          InboundEndpoint endpoint,
                          long frequency)
                   throws CreateException
Throws:
CreateException
Method Detail

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
Specified by:
doConnect in class AbstractMessageReceiver
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Specified by:
doDisconnect in class AbstractMessageReceiver
Throws:
Exception

doDispose

protected void doDispose()
Specified by:
doDispose in class AbstractMessageReceiver


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.