REQUIREMENT client.filepoller |
Type | OLD |
Priority | HIGH |
Status | DEPRECATED |
Topic | You can publish messages by putting files on a certain location in the file system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Des cription |
This is deprecated. It has been replaced by the contrib.filewatcher requirement.This is a native plugin which is listening on a certain directory in the file system. It detects by polling on the directory if a new file has arrived. Once the plugin assumes it has completely written, it will read its contents and publish them.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example any |
Testing your filter pattern You have two options to test your regular expression or your 'simple' filter in your configuration. First, you can use the Further you can test the pattern on command line: java org.xmlBlaster.client.filepoller.DirectoryManager -path /tmp/filepoller -filter "*.xml" -filterType simple java org.xmlBlaster.client.filepoller.DirectoryManager -path /tmp/filepoller -filter "hi.*\.xml" -filterType regex |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Configure |
The plugin is configured in the xmlBlasterPlugins.xml configuration file. Here an example where all properties are used: <xmlBlaster> ... <plugin id='FilePollerPlugin' className='org.xmlBlaster.client.filepoller.FilePollerPlugin'> <attribute id='directoryName'>/tmp/filePoller</attribute> <attribute id='topicName'>poller.test</attribute> <attribute id='publishKey'><key oid='poller.test'><poller><test/></poller></key></attribute> <attribute id='publishQos'><qos><expiration lifeTime='4000'/></qos></attribute> <attribute id='connectQos'></attribute> <attribute id='maximumFileSize'>10000000</attribute> <attribute id='delaySinceLastFileChange'>10000</attribute> <attribute id='pollInterval'>2000</attribute> <attribute id='loginName'>fritz</attribute> <attribute id='password'>secret</attribute> <attribute id='sent'>Sent</attribute> <attribute id='discarded'>Discarded</attribute> <attribute id='fileFilter'></attribute> <attribute id='lockExtention'>*.lck</attribute> <attribute id='filterType'>simple</attribute> <action do='LOAD' onStartupRunlevel='9' sequence='6' onFail='resource.configuration.pluginFailed'/> <action do='STOP' onShutdownRunlevel='6' sequence='5'/> </plugin> ... </xmlBlaster>and here a minimalistic one: <xmlBlaster> ... <plugin id='FilePollerPlugin' className='org.xmlBlaster.client.filepoller.FilePollerPlugin'> <attribute id='directoryName'>/tmp/filePoller</attribute> <attribute id='topicName'>poller.test</attribute> <!-- determines on which level to start/shutdown the plugin and what to do in case of an exception --> <action do='LOAD' onStartupRunlevel='9' sequence='6' onFail='resource.configuration.pluginFailed'/> <action do='STOP' onShutdownRunlevel='6' sequence='5'/> </plugin> ... </xmlBlaster>and here a more detailed description about each attribute:
NOTE: Configuration parameters are specified on command line (-someValue 17) or in the
xmlBlaster.properties file (someValue=17). See requirement "util.property" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See REQ | engine.runlevel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See TEST | org.xmlBlaster.test.client.TestFilePollerPlugin |
This page is generated from the requirement XML file xmlBlaster/doc/requirements/client.filepoller.xml