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 Set<AbstractRemoteFileOutboundGateway.Option> |
options |
loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate,
AbstractRemoteFileOutboundGateway.Command command,
String expression) |
AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate,
String command,
String expression) |
AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory,
AbstractRemoteFileOutboundGateway.Command command,
String expression) |
AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory,
String command,
String expression) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract List<AbstractFileInfo<F>> |
asFileInfoList(Collection<F> files) |
protected void |
doInit() |
protected abstract F |
enhanceNameWithSubDirectory(F file,
String directory) |
protected List<F> |
filterFiles(F[] files) |
protected List<File> |
filterMputFiles(File[] files) |
protected File |
get(Message<?> message,
Session<F> session,
String remoteDir,
String remoteFilePath,
String remoteFilename,
boolean lsFirst)
Copy a remote file to the configured local directory.
|
protected abstract String |
getFilename(AbstractFileInfo<F> file) |
protected abstract String |
getFilename(F file) |
protected abstract long |
getModified(F file) |
protected String |
getRemoteFilename(String remoteFilePath) |
protected Object |
handleRequestMessage(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 List<?> |
ls(Session<F> session,
String dir) |
protected List<File> |
mGet(Message<?> message,
Session<F> session,
String remoteDirectory,
String remoteFilename) |
protected void |
purgeDots(List<F> lsFiles) |
protected void |
purgeLinks(List<F> lsFiles) |
void |
setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory) |
void |
setFilter(FileListFilter<F> filter) |
void |
setLocalDirectory(File localDirectory) |
void |
setLocalDirectoryExpression(Expression localDirectoryExpression) |
void |
setLocalFilenameGeneratorExpression(Expression localFilenameGeneratorExpression) |
void |
setMputFilter(FileListFilter<File> filter) |
void |
setOptions(String options) |
void |
setRemoteFileSeparator(String remoteFileSeparator) |
void |
setRenameExpression(String expression) |
void |
setTemporaryFileSuffix(String temporaryFileSuffix) |
doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setOutputChannelName, setRequiresReply, setSendTimeout, shouldCopyRequestHeadersgetComponentType, getOrder, handleMessage, setOrder, setShouldTrackafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNameprotected final AbstractRemoteFileOutboundGateway.Command command
protected volatile Set<AbstractRemoteFileOutboundGateway.Option> options
public AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, String command, String expression)
public AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, AbstractRemoteFileOutboundGateway.Command command, String expression)
public AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, String command, String expression)
public AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, AbstractRemoteFileOutboundGateway.Command command, String expression)
public void setOptions(String options)
options - the options to setpublic void setRemoteFileSeparator(String remoteFileSeparator)
remoteFileSeparator - the remoteFileSeparator to setpublic void setLocalDirectory(File localDirectory)
localDirectory - the localDirectory to setpublic void setLocalDirectoryExpression(Expression localDirectoryExpression)
public void setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory)
autoCreateLocalDirectory - the autoCreateLocalDirectory to setpublic void setTemporaryFileSuffix(String temporaryFileSuffix)
temporaryFileSuffix - the temporaryFileSuffix to setpublic void setFilter(FileListFilter<F> filter)
filter - the filter to setpublic void setMputFilter(FileListFilter<File> filter)
filter - the filter to setpublic void setRenameExpression(String expression)
public void setLocalFilenameGeneratorExpression(Expression localFilenameGeneratorExpression)
protected void doInit()
doInit in class AbstractReplyProducingMessageHandlerprotected Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlerrequestMessage - The request message.null.protected List<?> ls(Session<F> session, String dir) throws IOException
IOExceptionprotected File get(Message<?> message, Session<F> session, String remoteDir, String remoteFilePath, String remoteFilename, boolean lsFirst) throws IOException
message - The message.session - The session.remoteDir - The remote directory.remoteFilePath - The remote file path.remoteFilename - The remote file name.lsFirst - true to execute an 'ls' command first.IOException - Any IOException.protected List<File> mGet(Message<?> message, Session<F> session, String remoteDirectory, String remoteFilename) throws IOException
IOExceptionprotected String getRemoteFilename(String remoteFilePath)
remoteFilePath - The remote file path.protected abstract boolean isDirectory(F file)
protected abstract boolean isLink(F file)
protected abstract String getFilename(AbstractFileInfo<F> file)
protected abstract long getModified(F file)
protected abstract List<AbstractFileInfo<F>> asFileInfoList(Collection<F> files)