org.springframework.integration.file.synchronization
Interface AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<F>
- Type Parameters:
F
- the file entry type (file, sftp, ftp, ...)
- Enclosing class:
- AbstractInboundRemoteFileSystemSychronizer<F>
public static interface AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<F>
Strategy interface to expose a hook for dispatching, moving, or deleting
the file once it has been delivered. This will typically be a NOOP for the
implementation. Adapters should (for consistency) expose an attribute
dictating whether the adapter will delete the source
entry on the remote file system. This is the file-system version of an
ack-mode
. Future implementations should consider exposing a
custom attribute that plugs a custom AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy
into the pipeline and also some more advanced scenarios (i.e., 'move file
to another folder on delete ', or 'rename on delete')
Method Summary |
void |
acknowledge(java.lang.Object useful,
F msg)
Semantics are simple. |
acknowledge
void acknowledge(java.lang.Object useful,
F msg)
throws java.lang.Exception
- Semantics are simple. You get a pointer to the entry just processed
and any kind of helper data you could ask for. Since the strategy is
a singleton and the clients you might ask for as context data are
pooled, it's not recommended that you try to cache them.
- Parameters:
useful
- any context datamsg
- the data / file / entry you want to process -- specific to subclasses
- Throws:
java.lang.Exception
- in case of an error while acknowledging