|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.file.synchronization.AbstractInboundRemoteFileSystemSychronizer<F>
public abstract class AbstractInboundRemoteFileSystemSychronizer<F>
Base class charged with knowing how to connect to a remote file system, scan it for new files and then download the files.
The implementation should run through any configuredFileListFilters to
ensure the file entry is acceptable.
| Nested Class Summary | |
|---|---|
static interface |
AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<F>
Strategy interface to expose a hook for dispatching, moving, or deleting the file once it has been delivered. |
| Field Summary | |
|---|---|
protected AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<F> |
entryAcknowledgmentStrategy
The AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy implementation. |
protected FileListFilter<F> |
filter
An FileListFilter that runs against the |
protected Resource |
localDirectory
The directory to which we write our synchronizations. |
protected java.util.concurrent.ScheduledFuture<?> |
scheduledFuture
The ScheduledFuture instance we get when we schedule our SynchronizeTask. |
protected boolean |
shouldDeleteSourceFile
Should we |
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractInboundRemoteFileSystemSychronizer()
|
|
| Method Summary | |
|---|---|
protected void |
acknowledge(java.lang.Object usefulContextOrClientData,
F file)
|
protected void |
doStart()
Subclasses must implement this method with the start behavior. |
protected void |
doStop()
Subclasses must implement this method with the stop behavior. |
protected abstract Trigger |
getTrigger()
Returns the Trigger that dictates how frequently the trigger should fire. |
void |
setEntryAcknowledgmentStrategy(AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<F> entryAcknowledgmentStrategy)
|
void |
setFilter(FileListFilter<F> filter)
|
void |
setLocalDirectory(Resource localDirectory)
|
void |
setShouldDeleteSourceFile(boolean shouldDeleteSourceFile)
|
protected abstract void |
syncRemoteToLocalFileSystem()
This is the callback where we need the implementation to do some specific work |
| Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint |
|---|
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop |
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean shouldDeleteSourceFile
protected volatile Resource localDirectory
protected volatile FileListFilter<F> filter
FileListFilter that runs against the
protected java.util.concurrent.ScheduledFuture<?> scheduledFuture
ScheduledFuture instance we get when we schedule our SynchronizeTask.
protected AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<F> entryAcknowledgmentStrategy
AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy implementation.
| Constructor Detail |
|---|
public AbstractInboundRemoteFileSystemSychronizer()
| Method Detail |
|---|
public void setEntryAcknowledgmentStrategy(AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<F> entryAcknowledgmentStrategy)
public void setShouldDeleteSourceFile(boolean shouldDeleteSourceFile)
public void setLocalDirectory(Resource localDirectory)
public void setFilter(FileListFilter<F> filter)
protected void acknowledge(java.lang.Object usefulContextOrClientData,
F file)
throws java.lang.Throwable
usefulContextOrClientData - this is context information to be passed to the individual AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy.
AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy.acknowledge(Object, Object) will be called in line with the
MessageSource.receive() call so this could conceivably
be a 'live' stateful client (a connection?) that is inappropriate to cache as it has per-request state.file - leverages strategy implementations to enable different
behavior. It's a hook to the file entry after it's been
successfully downloaded. Conceptually, you might delete the
remote one or rename it, etc.
java.lang.Throwable - escape hatch exception, let the adapter deal with it.protected void doStart()
AbstractEndpoint.lifecycleLock.
doStart in class AbstractEndpointprotected void doStop()
AbstractEndpoint.lifecycleLock.
doStop in class AbstractEndpointprotected abstract Trigger getTrigger()
Trigger that dictates how frequently the trigger should fire.
protected abstract void syncRemoteToLocalFileSystem()
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||