Element Summary

ElementDescriptionClass
componenta JBI component that interacts with the file system. It hosts endpoints that reads data from and writes data to the file system.org.apache.servicemix.file.FileComponent
pollerA polling endpoint that looks for a file or files in a directory and sends the files to a target service (via the JBI bus), deleting the files by default when they are processed. The polling endpoint uses a file marshaler to send the data as a JBI message; be default this marshaler expects XML payload. For non-XML payload, e.g. plain-text or binary files, use an alternative marshaler such as the org.apache.servicemix.components.util.BinaryFileMarshalerorg.apache.servicemix.file.FilePollerEndpoint
senderAn endpoint which receives messages from the NMR and writes the message to the file system.org.apache.servicemix.file.FileSenderEndpoint

Element Detail

Element: component

ElementTypeDescription
endpoints(poller | sender)*a list of beans defining the endpoints hosted by the component
executorFactory<spring:bean/>The executor factory to use to create the executor. If none is provided, one will be retrieved from the JBI container when the component is deployed into ServiceMix 3.x, or a default implementation will be used.

Element: poller

AttributeTypeDescription
archivexs:stringSpecifies a directory relative to the polling directory to which processed files are archived.
autoCreateDirectoryxs:booleanSpecifies if the endpoint should create the target directory, if it does not already exist. If you set this to false and the directory does not exist, the endpoint will not do anything. Default value is true.
concurrentPollingxs:boolean

Sets whether more than one poll can be active at a time (true means yes). Default value is false.

delayxs:long

Sets the amount of time in milliseconds that the endpoint should wait before making the first poll.

deleteFilexs:booleanSpecifies if files should be deleted after they are processed. Default value is true.
endpointxs:string

Get the endpoint implementation.

filexs:stringSpecifies the file or directory to be polled. If it is a directory, all files in the directory or its sub-directories will be processed by the endpoint. If it is a file, only files matching the filename will be processed."
firstTimexs:date

Sets the date on which the first poll will be executed. If a delay is also set using setDelay, the delay interval will be added after the date specified.

interfaceNamexs:QName

Get the qualified name of the endpoint interface.

maxConcurrentxs:integerHow many open exchanges can be pending. Default is -1 for unbounded pending exchanges. Set to 1...n to engage throttling of polled file processing.
periodxs:long

Sets the number of milliseconds between polling attempts.

recursivexs:booleanSpecifies if sub-directories are polled; if false then the poller will only poll the specified directory. If the endpoint is configured to poll for a specific file rather than a directory then this attribute is ignored. Default is true.
servicexs:QName

Get the service qualified name of the endpoint.

targetEndpointxs:stringthe name of the endpoint to which requests are sent
targetInterfacexs:QNamethe QName of the interface to which requests are sent
targetOperationxs:QNamethe QName of the operation to which requests are sent
targetServicexs:QNamethe QName of the service to which requests are sent
targetUrixs:string

Gets the target URI of the consumer endpoint.

ElementTypeDescription
comparator<spring:bean/>Specifies a Comparator which will be used to sort File listing before starting to process. The default is null, means no sorting. Comparator objects are implementations of java.util.Comparator.
componentcomponent
filter<spring:bean/>Bean defining the class implementing the file filtering strategy. This bean must be an implementation of the java.io.FileFilter interface.
lockManager<spring:bean/>Bean defining the class implementing the file locking strategy. This bean must be an implementation of the org.apache.servicemix.locks.LockManager interface. By default, this will be set to an instances of org.apache.servicemix.common.locks.impl.SimpleLockManager.
marshaler<spring:bean/>Specifies a FileMarshaler object that will marshal file data into the NMR. The default file marshaller can read valid XML data. FileMarshaler objects are implementations of org.apache.servicemix.components.util.FileMarshaler.
scheduler<spring:bean/>

Sets a custom scheduler implementation if you need more fine-grained control over the polling schedule.

serviceUnit<spring:bean/>

Element: sender

AttributeTypeDescription
appendxs:booleanSpecifies if the endpoint appends data to existing files or if it will overwrite existing files. The default is for the endpoint to overwrite existing files. Setting this to true instructs the endpoint to append data. Default value is false.
autoCreateDirectoryxs:booleanSpecifies if the endpoint should create the target directory if it does not exist. If you set this to false and the directory does not exist, the endpoint will not do anything. Default value: true.
directoryxs:stringSpecifies the directory where the endpoint writes files.
endpointxs:string

Get the endpoint implementation.

interfaceNamexs:QName

Get the qualified name of the endpoint interface.

overwritexs:booleanSpecifies if the endpoint overwrites existing files or not. The default is for the endpoint to not overwrite existing files. Setting this to true instructs the endpoint to overwrite existing files. Default value is false.
servicexs:QName

Get the service qualified name of the endpoint.

tempFilePrefixxs:stringSpecifies a string to prefix to the beginning of generated file names.
tempFileSuffixxs:stringSpecifies a string to append to generated file names.
ElementTypeDescription
componentcomponent
marshaler<spring:bean/>Specifies a FileMarshaler object that will marshal message data from the NMR into a file. The default file marshaler can write valid XML data. FileMarshaler objects are implementations of org.apache.servicemix.components.util.FileMarshaler.