helper

public class helper

Helper Class for different stuff.

Methods

getFiles

public static ArrayList<String> getFiles(String dir)

List all files in a given directory

Parameters:
  • dir – Directory to list
Returns:

List of files contained in dir

readConfiguration

public static String readConfiguration(String fileName, String property)

Read a single entry in the configuration

Parameters:
  • fileName – Configuration File
  • property – entry (property) to read
Returns:

value of the read property

setConfig

public static void setConfig(Configuration config)

Set predefined variables to the esper engine.

Parameters:
  • config – Espers Configuration

setMetaInfo

public static void setMetaInfo(Configuration config, String filename)

Read the metadata given in the metadata file defined in the configuration file

Parameters:
  • config – Espers Configuration
  • filename – metadata file containing additional environment information

setRules

public static void setRules(EPAdministrator cepAdm, ArrayList<MyListener> ListenerList, String filename, Boolean verbose)

Read the rules from the rules file and load rules that are defined as ‘used’

Parameters:
  • cepAdm – Espers EP Administrator
  • ListenerList – List of all listeners, new listeners are appended to
  • filename – rules file containing rules and other definitions
  • verbose – print additional output or not

writeToFile

public static void writeToFile(Monitor monitor, String filename)

The monitoring measurements done by the monitoring thread are written to the output file specified in the configuration file

Parameters:
  • monitor – Monitoring Class holding the measurement lists
  • filename – configured filename for storing the data