xmlBlaster 2.2.0 API

org.xmlBlaster.test.contrib.filewatcher
Class FileWatcherFeeder

java.lang.Object
  extended by org.xmlBlaster.contrib.GlobalInfo
      extended by 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).


Nested Class Summary
(package private)  class FileWatcherFeeder.Replacer
           
 
Field Summary
private  java.lang.String content
           
private  long counter
           
private  Global global
           
private  java.lang.String[] hosts
           
private  FileWatcherFeeder.Replacer replacer
           
private  ReplaceVariable replaceVariable
           
private  java.lang.String repository
           
private  long sleepDelay
           
 
Fields inherited from class org.xmlBlaster.contrib.GlobalInfo
LOWER_CASE, ORIGINAL_ENGINE_GLOBAL, pluginInfo, UNTOUCHED, UPPER_CASE
 
Fields inherited from interface org.xmlBlaster.contrib.I_Info
ID, JMX_PREFIX
 
Constructor Summary
FileWatcherFeeder(java.lang.String[] args)
           
 
Method Summary
protected  void doInit(Global global, PluginInfo pluginInfo)
           
private  java.lang.String[] getHosts()
           
static void main(java.lang.String[] args)
           
 void process()
           
private  java.lang.String readFile(java.lang.String filename)
           
 java.lang.String replace(java.lang.String txt)
           
 
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
 

Field Detail

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
Constructor Detail

FileWatcherFeeder

public FileWatcherFeeder(java.lang.String[] args)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

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)

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.