public abstract class AbstractRemoteFileOutboundGateway<F> extends AbstractReplyProducingMessageHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractRemoteFileOutboundGateway.Command
Enumeration of commands supported by the gateways.
|
static class |
AbstractRemoteFileOutboundGateway.Option
Enumeration of options supported by various commands.
|
AbstractReplyProducingMessageHandler.RequestHandler| Modifier and Type | Field and Description |
|---|---|
protected AbstractRemoteFileOutboundGateway.Command |
command |
protected java.util.Set<AbstractRemoteFileOutboundGateway.Option> |
options |
logger| Constructor and Description |
|---|
AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate,
AbstractRemoteFileOutboundGateway.Command command,
java.lang.String expression) |
AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate,
java.lang.String command,
java.lang.String expression) |
AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory,
AbstractRemoteFileOutboundGateway.Command command,
java.lang.String expression) |
AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory,
java.lang.String command,
java.lang.String expression) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.List<AbstractFileInfo<F>> |
asFileInfoList(java.util.Collection<F> files) |
protected void |
doInit() |
protected abstract F |
enhanceNameWithSubDirectory(F file,
java.lang.String directory) |
protected java.util.List<F> |
filterFiles(F[] files) |
protected java.util.List<java.io.File> |
filterMputFiles(java.io.File[] files) |
protected java.io.File |
get(org.springframework.messaging.Message<?> message,
Session<F> session,
java.lang.String remoteDir,
java.lang.String remoteFilePath,
java.lang.String remoteFilename,
boolean lsFirst)
Copy a remote file to the configured local directory.
|
protected abstract java.lang.String |
getFilename(AbstractFileInfo<F> file) |
protected abstract java.lang.String |
getFilename(F file) |
protected abstract long |
getModified(F file) |
protected java.lang.String |
getRemoteFilename(java.lang.String remoteFilePath) |
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
protected abstract boolean |
isDirectory(F file) |
protected abstract boolean |
isLink(F file) |
protected java.util.List<?> |
ls(Session<F> session,
java.lang.String dir) |
protected java.util.List<java.io.File> |
mGet(org.springframework.messaging.Message<?> message,
Session<F> session,
java.lang.String remoteDirectory,
java.lang.String remoteFilename) |
protected void |
purgeDots(java.util.List<F> lsFiles) |
protected void |
purgeLinks(java.util.List<F> lsFiles) |
void |
setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory) |
void |
setFilter(FileListFilter<F> filter) |
void |
setLocalDirectory(java.io.File localDirectory) |
void |
setLocalDirectoryExpression(org.springframework.expression.Expression localDirectoryExpression) |
void |
setLocalFilenameGeneratorExpression(org.springframework.expression.Expression localFilenameGeneratorExpression) |
void |
setMputFilter(FileListFilter<java.io.File> filter) |
void |
setOptions(java.lang.String options) |
void |
setRemoteFileSeparator(java.lang.String remoteFileSeparator) |
void |
setRenameExpression(java.lang.String expression) |
void |
setTemporaryFileSuffix(java.lang.String temporaryFileSuffix) |
doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout, shouldCopyRequestHeadersgetComponentType, getOrder, handleMessage, setOrder, setShouldTrackafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNameprotected final AbstractRemoteFileOutboundGateway.Command command
protected volatile java.util.Set<AbstractRemoteFileOutboundGateway.Option> options
public AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, java.lang.String command, java.lang.String expression)
public AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, AbstractRemoteFileOutboundGateway.Command command, java.lang.String expression)
public AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, java.lang.String command, java.lang.String expression)
public AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, AbstractRemoteFileOutboundGateway.Command command, java.lang.String expression)
public void setOptions(java.lang.String options)
options - the options to setpublic void setRemoteFileSeparator(java.lang.String remoteFileSeparator)
remoteFileSeparator - the remoteFileSeparator to setpublic void setLocalDirectory(java.io.File localDirectory)
localDirectory - the localDirectory to setpublic void setLocalDirectoryExpression(org.springframework.expression.Expression localDirectoryExpression)
public void setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory)
autoCreateLocalDirectory - the autoCreateLocalDirectory to setpublic void setTemporaryFileSuffix(java.lang.String temporaryFileSuffix)
temporaryFileSuffix - the temporaryFileSuffix to setpublic void setFilter(FileListFilter<F> filter)
filter - the filter to setpublic void setMputFilter(FileListFilter<java.io.File> filter)
filter - the filter to setpublic void setRenameExpression(java.lang.String expression)
public void setLocalFilenameGeneratorExpression(org.springframework.expression.Expression localFilenameGeneratorExpression)
protected void doInit()
doInit in class AbstractReplyProducingMessageHandlerprotected java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlerprotected java.util.List<?> ls(Session<F> session, java.lang.String dir) throws java.io.IOException
java.io.IOExceptionprotected final java.util.List<java.io.File> filterMputFiles(java.io.File[] files)
protected void purgeLinks(java.util.List<F> lsFiles)
protected void purgeDots(java.util.List<F> lsFiles)
protected java.io.File get(org.springframework.messaging.Message<?> message,
Session<F> session,
java.lang.String remoteDir,
java.lang.String remoteFilePath,
java.lang.String remoteFilename,
boolean lsFirst)
throws java.io.IOException
message - session - remoteDir - remoteFilePath - @throws IOExceptionjava.io.IOExceptionprotected java.util.List<java.io.File> mGet(org.springframework.messaging.Message<?> message,
Session<F> session,
java.lang.String remoteDirectory,
java.lang.String remoteFilename)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getRemoteFilename(java.lang.String remoteFilePath)
remoteFilePath - protected abstract boolean isDirectory(F file)
protected abstract boolean isLink(F file)
protected abstract java.lang.String getFilename(F file)
protected abstract java.lang.String getFilename(AbstractFileInfo<F> file)
protected abstract long getModified(F file)
protected abstract java.util.List<AbstractFileInfo<F>> asFileInfoList(java.util.Collection<F> files)