public class FtpMessageReceiver extends AbstractPollingMessageReceiver
Modifier and Type | Field and Description |
---|---|
protected FtpConnector |
connector |
protected Set<String> |
currentFiles |
protected FilenameFilter |
filenameFilter |
protected Set<String> |
scheduledFiles |
DEFAULT_POLL_FREQUENCY, DEFAULT_POLL_TIMEUNIT, DEFAULT_STARTUP_DELAY, schedules
defaultInboundTransformers, defaultResponseTransformers, flowConstruct, listener, receiverKey, replyToHandler
connected, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
FtpMessageReceiver(Connector connector,
FlowConstruct flowConstruct,
InboundEndpoint endpoint,
long frequency) |
Modifier and Type | Method and Description |
---|---|
protected FtpMuleMessageFactory |
createMuleMessageFactory(org.apache.commons.net.ftp.FTPClient client) |
protected void |
doConnect() |
protected void |
doDisconnect() |
protected void |
doDispose() |
protected void |
doInitialise() |
protected void |
initializeMessageFactory()
Subclasses can override this method to create a custom
MuleMessageFactory instead
of re-using the instance from the connector. |
protected org.apache.commons.net.ftp.FTPFile[] |
listFiles() |
void |
poll() |
protected boolean |
pollOnPrimaryInstanceOnly()
If this returns true for a transport, polling for that transport takes place only on the primary instance.
|
protected void |
postProcess(org.apache.commons.net.ftp.FTPClient client,
org.apache.commons.net.ftp.FTPFile file,
MuleMessage message) |
RetryContext |
validateConnection(RetryContext retryContext)
Test whether the connector is able to connect to its resource(s).
|
createWork, disableNativeScheduling, doStart, doStop, getBatchSize, getFrequency, getTimeUnit, performPoll, schedule, setFrequency, setTimeUnit, unschedule
applyInboundTransformers, applyResponseTransformers, connectHandler, createExecutionTemplate, createLifecycleManager, createMuleEvent, doStartHandler, getConnectEventId, getConnectionDescription, getEndpoint, getEndpointURI, getFlowConstruct, getReceiverKey, getReplyToHandler, getWorkManager, handleUnacceptedFilter, initialise, processMessage, propagateRootMessageIdProperty, routeEvent, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, setEndpoint, setListener, setReceiverKey, shouldConsumeInEveryNode, toString, warnIfMuleClientSendUsed
activate, connect, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, getConnectEventId, getConnector, getLifecycleState, initializeRetryPolicy, isConnected, isDoThreading, isStarted, isStarting, isStopped, isStopping, passivate, setEndpoint, start, stop, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createMuleMessage, createMuleMessage
connect, disconnect, isConnected
dispose
protected final FtpConnector connector
protected final FilenameFilter filenameFilter
public FtpMessageReceiver(Connector connector, FlowConstruct flowConstruct, InboundEndpoint endpoint, long frequency) throws CreateException
CreateException
protected void doInitialise() throws InitialisationException
doInitialise
in class AbstractTransportMessageHandler
InitialisationException
public void poll() throws Exception
poll
in class AbstractPollingMessageReceiver
Exception
protected boolean pollOnPrimaryInstanceOnly()
AbstractPollingMessageReceiver
pollOnPrimaryInstanceOnly
in class AbstractPollingMessageReceiver
protected org.apache.commons.net.ftp.FTPFile[] listFiles() throws Exception
Exception
protected void initializeMessageFactory() throws InitialisationException
AbstractTransportMessageHandler
MuleMessageFactory
instead
of re-using the instance from the connector.initializeMessageFactory
in class AbstractTransportMessageHandler
InitialisationException
protected FtpMuleMessageFactory createMuleMessageFactory(org.apache.commons.net.ftp.FTPClient client) throws CreateException
CreateException
protected void postProcess(org.apache.commons.net.ftp.FTPClient client, org.apache.commons.net.ftp.FTPFile file, MuleMessage message) throws Exception
Exception
protected void doConnect() throws Exception
doConnect
in class AbstractTransportMessageHandler
Exception
public RetryContext validateConnection(RetryContext retryContext)
Connectable
RetryContext.setOk()
when no problems found (or no validation required).
RetryContext.setFailed(Throwable)
with a root cause for a connection failure.
RetryContext.isOk()
. The failure, if any, will be
provided via the RetryContext.getLastFailure()
.validateConnection
in interface Connectable
validateConnection
in class AbstractTransportMessageHandler
protected void doDisconnect() throws Exception
doDisconnect
in class AbstractTransportMessageHandler
Exception
protected void doDispose()
doDispose
in class AbstractMessageReceiver
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.