Configures a 'SourcePollingChannelAdapter' Endpoint for the
'org.springframework.integration.file.FileReadingMessageSource' that
polls a directory and sends Messages whose payloads are
instances of java.io.File.
Reference to a custom DirectoryScanner implementation.
Mutually exclusive with 'use-watch-service' attribute.
Indicates if the 'FileReadingMessageSource' should use an internal 'DirectoryScanner'
for the Java 7 'WatchService'.
Mutually exclusive with 'scanner' attribute.
Comma-separated value for the 'FileReadingMessageSource.WatchEventType's
to specify which kinds of files system events the 'WatchService' will listen to.
Used only if 'use-watch-service == true'.
Specify whether to automatically create the source directory if it does not yet exist when this
adapter is being initialized. The default value is 'true'. If set to 'false' and the directory
does not exist upon initialization, an Exception will be thrown.
Specify the maximum number of files stored in memory by the underlying FileReadingMessageSource.
This is useful to limit the memory footprint of this endpoint. Using a stateful filter would counter
this benefit, so AcceptOnceFileListFilter is not used when this attribute is specified.
MUTUALLY EXCLUSIVE with comparator, if comparator is set this attribute will be ignored.
MUTUALLY EXCLUSIVE with stateful filtering.
Set this flag if you want to make sure the internal queue is
refreshed with the latest content of the input directory on each poll.
Configures a Consumer Endpoint for the
'org.springframework.integration.file.FileWritingMessageHandler'
with 'expectReply = false'
that writes Message payloads to a File.
The channel through which outgoing messages will arrive.
Configures a Message Producing Endpoint for the
'org.springframework.integration.file.tail.FileTailingMessageProducerSupport that 'tails' a file on the
filesystem.
Configures the adapter to exec 'tail' with these options (appended by the file name).
Default: "-F -n 0" (follow the filename and emit no
existing lines). This attribute is not allowed if 'delay' 'end' or 'reopen' is
specified, which cause the Apache commons-io 'Tailer' class to be used instead of
using a native 'tail' command.
Configure the adapter to either start a thread for capturing stderr or not.
Default: True
The fully qualified name of the file to be tailed.
A reference to a TaskExecutor; the default is a SimpleAsyncTaskExecutor; the
native adapter uses three threads - one for reading stdout, one for
reading stderr and one for monitoring the process.
A reference to a TaskScheduler; the default is the 'taskScheduler' bean
which is automatically configured for all Spring Integration applications.
The scheduler is used by the native adapter to reschedule
the 'tail' process after a failure according to the 'file-delay', and also
it is used to emit idle event.
The delay in milliseconds between attempts to open the file when no file was found (Apache adapter).
For the native adapter, this is used as a delay before starting a new process after process failures.
On some platforms, when the file doesn't exist, the 'tail' process is suspended until the file
appears; on other platforms, the 'tail' process exits immediately if the file doesn't exist.
Default 5000.
Does not apply to the native adapter - the delay in milliseconds between polls when no new
data was detected in the file. Default 1000. Note: Setting this option forces the use of the Apache
Tailer implementation instead of the native 'tail' command.
The delay in milliseconds between idle events when no new lines are being tailed.
Does not apply to the native adapter.
Set to 'true' to tail from the end of the file, 'false' to tail from the beginning of the file.
Default 'true'. Note: Setting this option forces the use of the Apache
Tailer implementation instead of the native 'tail' command.
Does not apply to the native adapter.
If 'true', close and reopen the file between reading chunks.
Default 'false'. Note: Setting this option forces the use of the Apache
Tailer implementation instead of the native 'tail' command.
Message Channel to which error Messages should be sent.
Configures a Consumer Endpoint for the
'org.springframework.integration.file.FileWritingMessageHandler'
that writes request Message payloads to a File and then generates a
reply Message containing the newly written File as its payload.
The channel through which outgoing messages will arrive.
Specify whether this outbound gateway must return a non-null value. This value is
'true' by default, and a ReplyRequiredException will be thrown when
the underlying service returns a null value.
Allows you to provide a SpEL expression which will compute the file name of
the target file (e.g., assuming payload is java.io.File "payload.name + '.transferred'");
Extension used when uploading files. We change it after we know it's uploaded.
This attribute is mutually exclusive with 'append' since the append is done to the
actual file and not its temporary counterpart. The default value of this attribute (i.e., .writing)
is ignored when 'append' is set to true.
Specify whether to automatically create the destination directory if it does not yet exist when this
adapter is being initialized. The default value is 'true'. If set to 'false' and the directory does
not exist upon initialization, an Exception will be thrown.
Set the charset name to use when writing a File from a String-based
Message payload, e.g. charset="UTF-8". If not set, the default charset of this
Java virtual machine is used.
Set to 'true' to append a new-line after each write.
It is 'false' by default.
The buffer size to use when writing to files.
Default 8192 bytes.
When using 'mode=APPEND_NO_FLUSH', if this time (ms) elapses
without any new writes, the data is flushed and the file closed.
Default 30000.
When using 'mode=APPEND_NO_FLUSH', set to false to indicate the
'flush-interval' starts from the first new write to a previously
flushed (or new) file. When true, the interval starts from the
last write (the file is flushed if it has no writes during the interval).
Default true.
When using 'mode=APPEND_NO_FLUSH',
a reference to a 'FlushPredicate' implementation used when a message is
sent to the message handler's 'MessageTriggerAction.trigger()' method.
By default, the payload of such a message must be a Regex used to match
the file absolute path.
Specify whether to preserve the modified timestamp from the source
file on the destination file after copying. Applies to 'java.io.File' payloads.
For other payload types, the optional 'file_setModified' header will be used,
if present (and a 'Number'), to set the lastModified time.
By default, the timestamp will NOT be preserved.
Creates a 'org.springframework.integration.file.transformer.FileToStringTransformer'
that converts a File payload to a String.
Creates a 'org.springframework.integration.file.transformer.FileToByteArrayTransformer'
that converts a File payload to an array of bytes.
Identifies the underlying Spring bean definition (EventDrivenConsumer)
Creates a 'org.springframework.integration.file.splitter.FileSplitter'
that splits text-based files into lines.
The header name for the first line to be carried as a header in the messages emitted for the
remaining lines.
Specify whether the splitter must return at least one message. This value will be
'false' by default, but if set to 'true', a ReplyRequiredException will be thrown when
the file has no data.
Set this flag to determine whether sequence related headers are added to messages
from this splitter. When true, existing correlation and sequence related headers
are pushed onto a stack; downstream components, such as aggregators may pop
the stack to revert the existing headers after aggregation. Default is 'true'
unless 'markers' is 'true'. Also see 'iterator'.
Set this flag to determine whether the lines are emitted via an iterator (line at a time)
or the whole file is read into memory and then the lines emitted. When this is 'true', if
'apply-sequence' is also 'true', the 'sequenceSize' header is set to '0'. Default: 'true'.
Set to 'true' to emit start/end of file marker messages before and after the file data.
Markers are messages with 'FileSplitter.FileMarker' payloads (with 'START' and 'END' values
in the 'mark' property).
Markers might be used when sequentially processing files in a downstream flow where some lines
are filtered.
The 'END' marker includes a line count.
They enable the downstream processing to know when a file has been completely processed.
A header 'file_marker' is also added, containing START/END appropriately.
Default: 'false'.
When 'true', 'apply-sequence' is 'false' by default.
Also see 'markers-json'.
When 'markers' is true, if this is 'true', the message payload of the marker
is a JSON String representation of the marker object.
Requires a supported JSON processor library on the classpath (Jackson, Boon).
The channel where the splitter will send the messages that return an empty container from
split function.
Allows you to specify Charset (e.g., US-ASCII, ISO-8859-1, UTF-8). [UTF-8] is default -
used when converting String payloads to bytes.
Specify a SpEL expression which
will be used to evaluate the temporary directory
path to where files will be transferred before they are moved to the remote-directory
(e.g., "headers.['remote_dir'] +
'/temp/myTransfers'");
Specify whether to automatically create the
remote target directory if
it doesn't exist.
Allows you to specify a reference to
[org.springframework.integration.file.FileNameGenerator] bean.
Allows you to provide SpEL expression which
will compute file name of
the remote file (e.g., assuming payload
is java.io.File
"payload.getName() + '.transferred'");
Allows you to suppress using a temporary file name while writing the file.
Change the mode of the file (or remote file) after writing. Integer value
expressed in Octal, e.g. '644'.