public class FtpOutboundGateway
extends org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>
org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.Command, org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.Optioncommand, options, remoteFileTemplatemessagingTemplateEXPRESSION_PARSER, logger| Constructor and Description |
|---|
FtpOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate,
org.springframework.integration.file.remote.MessageSessionCallback<org.apache.commons.net.ftp.FTPFile,?> messageSessionCallback)
Construct an instance with the supplied remote file template and callback
for performing operations on the session.
|
FtpOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate,
java.lang.String command)
Construct an instance with the supplied remote file template
and command ('ls', 'nlst', 'put' or 'mput').
|
FtpOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate,
java.lang.String command,
java.lang.String expression)
Construct an instance with the supplied remote file template, a command ('ls',
'get' etc), and an expression to determine the filename.
|
FtpOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory,
org.springframework.integration.file.remote.MessageSessionCallback<org.apache.commons.net.ftp.FTPFile,?> messageSessionCallback)
Construct an instance using the provided session factory and callback for
performing operations on the session.
|
FtpOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory,
java.lang.String command)
Construct an instance with the supplied session factory
and command ('ls', 'nlst', 'put' or 'mput').
|
FtpOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory,
java.lang.String command,
java.lang.String expression)
Construct an instance with the supplied session factory, a command ('ls', 'get'
etc), and an expression to determine the filename.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<org.springframework.integration.file.remote.AbstractFileInfo<org.apache.commons.net.ftp.FTPFile>> |
asFileInfoList(java.util.Collection<org.apache.commons.net.ftp.FTPFile> files) |
protected void |
doInit() |
protected org.apache.commons.net.ftp.FTPFile |
enhanceNameWithSubDirectory(org.apache.commons.net.ftp.FTPFile file,
java.lang.String directory) |
protected java.io.File |
get(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteDir,
java.lang.String remoteFilePath,
java.lang.String remoteFilename,
org.apache.commons.net.ftp.FTPFile fileInfoParam) |
java.lang.String |
getComponentType() |
protected java.lang.String |
getFilename(org.springframework.integration.file.remote.AbstractFileInfo<org.apache.commons.net.ftp.FTPFile> file) |
protected java.lang.String |
getFilename(org.apache.commons.net.ftp.FTPFile file) |
protected long |
getModified(org.apache.commons.net.ftp.FTPFile file) |
protected boolean |
isDirectory(org.apache.commons.net.ftp.FTPFile file) |
protected boolean |
isLink(org.apache.commons.net.ftp.FTPFile file) |
protected java.util.List<?> |
ls(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String dir) |
protected java.util.List<java.io.File> |
mGet(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteDirectory,
java.lang.String remoteFilename) |
protected java.util.List<java.lang.String> |
mPut(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.io.File localDir) |
protected boolean |
mv(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteFilePath,
java.lang.String remoteFileNewPath) |
protected java.util.List<java.lang.String> |
nlst(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String dir) |
protected java.lang.String |
put(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String subDirectory) |
protected boolean |
rm(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteFilePath) |
void |
setWorkingDirExpression(org.springframework.expression.Expression workingDirExpression)
Specify an
Expression to evaluate FTP client working directory
against request message. |
void |
setWorkingDirExpressionString(java.lang.String workingDirExpression)
Specify a SpEL
Expression to evaluate FTP client working directory
against request message. |
doChmod, filterFiles, filterMputFiles, getRemoteFilename, handleRequestMessage, isChmodCapable, purgeDots, purgeLinks, setAutoCreateLocalDirectory, setChmod, setChmodOctal, setFileExistsMode, setFilter, setLocalDirectory, setLocalDirectoryExpression, setLocalDirectoryExpressionString, setLocalFilenameGeneratorExpression, setLocalFilenameGeneratorExpressionString, setMputFilter, setOption, setOptions, setRemoteFileSeparator, setRenameExpression, setRenameExpressionString, setTemporaryFileSuffixdoInvokeAdvisedRequestHandler, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyaddNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeadersconfigureMetrics, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic FtpOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory,
org.springframework.integration.file.remote.MessageSessionCallback<org.apache.commons.net.ftp.FTPFile,?> messageSessionCallback)
sessionFactory - the session factory.messageSessionCallback - the callback.public FtpOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate,
org.springframework.integration.file.remote.MessageSessionCallback<org.apache.commons.net.ftp.FTPFile,?> messageSessionCallback)
remoteFileTemplate - the remote file template.messageSessionCallback - the callback.public FtpOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory,
java.lang.String command,
java.lang.String expression)
sessionFactory - the session factory.command - the command.expression - the filename expression.public FtpOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate,
java.lang.String command,
java.lang.String expression)
remoteFileTemplate - the remote file template.command - the command.expression - the filename expression.public FtpOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory,
java.lang.String command)
The remoteDirectory expression is null assuming to use
the workingDirectory from the FTP Client.
sessionFactory - the session factory.command - the command.public FtpOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate,
java.lang.String command)
The remoteDirectory expression is null assuming to use
the workingDirectory from the FTP Client.
remoteFileTemplate - the remote file template.command - the command.public void setWorkingDirExpression(org.springframework.expression.Expression workingDirExpression)
Expression to evaluate FTP client working directory
against request message.workingDirExpression - the expression to evaluate working directorypublic void setWorkingDirExpressionString(java.lang.String workingDirExpression)
Expression to evaluate FTP client working directory
against request message.workingDirExpression - the SpEL expression to evaluate working directorypublic java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.support.context.NamedComponentgetComponentType in class org.springframework.integration.handler.AbstractMessageHandlerprotected boolean isDirectory(org.apache.commons.net.ftp.FTPFile file)
isDirectory in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected boolean isLink(org.apache.commons.net.ftp.FTPFile file)
isLink in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected java.lang.String getFilename(org.apache.commons.net.ftp.FTPFile file)
getFilename in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected java.lang.String getFilename(org.springframework.integration.file.remote.AbstractFileInfo<org.apache.commons.net.ftp.FTPFile> file)
getFilename in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected long getModified(org.apache.commons.net.ftp.FTPFile file)
getModified in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected java.util.List<org.springframework.integration.file.remote.AbstractFileInfo<org.apache.commons.net.ftp.FTPFile>> asFileInfoList(java.util.Collection<org.apache.commons.net.ftp.FTPFile> files)
asFileInfoList in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected void doInit()
doInit in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected org.apache.commons.net.ftp.FTPFile enhanceNameWithSubDirectory(org.apache.commons.net.ftp.FTPFile file,
java.lang.String directory)
enhanceNameWithSubDirectory in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected java.util.List<?> ls(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String dir)
throws java.io.IOException
ls in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionprotected java.util.List<java.lang.String> nlst(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String dir)
throws java.io.IOException
nlst in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionprotected java.io.File get(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteDir,
java.lang.String remoteFilePath,
java.lang.String remoteFilename,
org.apache.commons.net.ftp.FTPFile fileInfoParam)
throws java.io.IOException
get in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionprotected java.util.List<java.io.File> mGet(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteDirectory,
java.lang.String remoteFilename)
throws java.io.IOException
mGet in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionprotected boolean rm(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteFilePath)
throws java.io.IOException
rm in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionprotected boolean mv(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String remoteFilePath,
java.lang.String remoteFileNewPath)
throws java.io.IOException
mv in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionprotected java.lang.String put(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.lang.String subDirectory)
put in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>protected java.util.List<java.lang.String> mPut(org.springframework.messaging.Message<?> message,
org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile> session,
java.io.File localDir)
mPut in class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>