org.xmlBlaster.test.contrib.filewatcher
Class FileWatcherFeeder
java.lang.Object
org.xmlBlaster.contrib.GlobalInfo
org.xmlBlaster.test.contrib.filewatcher.FileWatcherFeeder
- All Implemented Interfaces:
- I_Info, I_Plugin
public class FileWatcherFeeder
- extends GlobalInfo
This class is used to write files to the location where one or more file watchers are getting their data from.
It additionally to the common properties the following properties:
- filewatcher.test.sourceFile = the file from which to read the input data
- filewatcher.test.host.* = prio (the higher the oftener)
- filewatcher.test.delay = the time to sleep
- filewatcher.test.counter = the variable to use in the file for an incrementing counter (to be unique) (in the properties it indicates where to start)
- filewatcher.test.hostname = the current hostname
- filewatcher.test.repository = the base directory where to write (a subdirectory for each host is created).
Methods inherited from class org.xmlBlaster.contrib.GlobalInfo |
dump, get, getBoolean, getGlobal, getInt, getKeys, getLong, getObject, getObjectKeys, getOriginalGlobal, getRaw, getStrippedString, getType, getVersion, init, loadPlugin, put, putObject, putRaw, replaceAllEntries, setStrippedHostname, shutdown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
replaceVariable
private ReplaceVariable replaceVariable
replacer
private FileWatcherFeeder.Replacer replacer
content
private java.lang.String content
global
private Global global
hosts
private java.lang.String[] hosts
sleepDelay
private long sleepDelay
counter
private long counter
repository
private java.lang.String repository
FileWatcherFeeder
public FileWatcherFeeder(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
doInit
protected void doInit(Global global,
PluginInfo pluginInfo)
throws XmlBlasterException
- Specified by:
doInit
in class GlobalInfo
- Parameters:
global
- The global passed by the RunLevelManager, this is not the object owned by the plugin. It is the original global.
- Throws:
XmlBlasterException
getHosts
private java.lang.String[] getHosts()
replace
public final java.lang.String replace(java.lang.String txt)
readFile
private java.lang.String readFile(java.lang.String filename)
throws java.lang.Exception
- Throws:
java.lang.Exception
process
public void process()
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
Copyright © 1999-2014 The xmlBlaster.org contributers.