blob: 1d3db31996d546218c7dc15ea9df979e07676317 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by Apache ServiceMix Archetype -->
<beans xmlns:file="http://servicemix.apache.org/file/1.0"
xmlns:replaceMe="http://servicemix.apache.org/replaceMe" xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://servicemix.apache.org/file/1.0 http://servicemix.apache.org/schema/servicemix-file-@{components.version}.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<!--
The ServiceMix File component provides integration to the file system.
It can be used to read and write files via URI or to periodically poll directories
for new files.
-->
<!-- BEGIN SNIPPET: file-poller -->
<!--
The poller endpoint generates an InOnly message.
Attributes:
service : the endpoint service name
endpoint : the endpoint name
interfaceName : the endpoint interface name
targetService : the target endpoint service name
targetEndpoint : the target endpoint name
targetInterface : the target interface name
targetUri : the URI of the target endpoint
autoCreateDirectory : creates directory if it doesn't exist
firstTime : datetime before first poll can take place
delay : amount of time first polling is delayed after start
period : amount of time between polls
file : sets the file or directory to poll
deleteFile : delete file when it is processed
recursive : process sub directories
marshaler : implementation of FileMarshaler to use (DefaultFileMarshaler by default)
lockManager : implementation of LockManager to use (SimpleLockManager by default)
filter : implementation of FileFilter (optional filter)
scheduler : Scheduler to use
comparator : implementation of Comparator<File> interface
archive : sets the directory to archive files before deleting them
-->
<file:poller service="replaceMe:serviceName" endpoint="file-poller"
targetService="replaceMe:targetService"
targetEndpoint="replaceMe:targetEndpoint"
file="file:/pool/directory">
<!-- Custom Marshaler, if you are not going to poll xml files. -->
<!--
<property name="marshaler">
<bean class="org.apache.servicemix.components.util.BinaryFileMarshaler" />
</property>
-->
<!-- Custom file filter which uses Apache Commons IO WildcardFilter. -->
<!--
<property name="filter">
<bean class="org.apache.commons.io.filefilter.WildcardFilter">
<constructor-arg value="*.csv" />
</bean>
</property>
-->
</file:poller>
<!-- END SNIPPET: file-poller -->
<!-- BEGIN SNIPPET: file-sender -->
<!--
The sender endpoint creates a file from the incoming message and writes it into the specified directory.
Attributes:
service : the endpoint service name
endpoint : the endpoint name
directory : the target directory where to write created file
autoCreateDirectory : creates directory if it doesn't exist
append : append to an existing file instead of overwriting it
marshaler : implementation of the FileMarshaler to use (DefaultFileMarshaler by default)
tempFilePrefix : the prefix of the temporary file used during file generation
tempFileSuffix : the suffix of the temporary file used during file generation
-->
<file:sender service="replaceMe:serviceName"
endpoint="file-sender"
directory="file:target/files" />
<!-- END SNIPPET: file-sender -->
</beans>