Helper class for the Software AG Apama Event Correlator.
The Correlator Helper class has been designed for use as an extension
module to the PySys System Test Framework, offering the ability to
configure, start and interact with an Event Correlator. The usage pattern
of the class is to create an instance per Correlator, and to then make
method calls onto the instance to perform operations such as the
injection of EPL or java JMON applications, the sending of events,
deletion of named objects etc. For example:
Process related methods of the class declare a method signature which
includes named parameters for the most frequently used options to the
method. They also declare the **xargs parameter to allow passing in of
additional supported arguments to the process. The additional arguments
that are currently supported via **xargs are:
|
__init__(self,
parent,
port=None,
host=None,
name=' correlator ' )
Create an instance of the CorrelatorHelper class. |
source code
|
|
|
addToClassPath(self,
path)
Add the supplied path to the Java classpath variable for starting
this instance. |
source code
|
|
|
addToPath(self,
path)
Add the supplied path to the PATH (win32) or LD_LIBRARY_PATH (unix)
environment variable for starting this instance. |
source code
|
|
|
start(self,
logfile=None,
verbosity=None,
java=False,
Xclock=None,
environ=None,
inputLog=None,
waitForServerUp=True,
config=None,
**xargs)
Start the Correlator. |
source code
|
|
|
receive(self,
filename=None,
filedir=None,
channels=[ ] ,
suppressBatch=True,
zeroAtFirstBatch=False,
utf8=False,
logChannels=False,
**xargs)
Attach a receiver to the Correlator. |
source code
|
|
|
watch(self,
filename=None,
filedir=None,
raw=False,
interval=None,
**xargs)
Obtain runtime operational statistics from the Correlator. |
source code
|
|
|
inspect(self,
filename=' inspect.txt ' ,
filedir=None,
raw=False,
**xargs)
Obtain information about what application(s) have been injected into
the Correlator and what listeners are in existence. |
source code
|
|
|
initialize(self,
path,
correlatorName=None,
properties=None,
include=None,
exclude=None,
**xargs)
Initialize the Correlator by injecting all the files making up the
project, typically based on a Designer launch configuration .deploy
file. |
source code
|
|
|
injectEPL(self,
filenames=[ ] ,
filedir=None,
utf8=False,
**xargs)
Inject EPL *.mon files into the Correlator. |
source code
|
|
|
injectJava(self,
filename,
filedir=None,
**xargs)
Inject a Java plug-in or application into the Correlator. |
source code
|
|
|
injectCDP(self,
filenames=[ ] ,
filedir=None,
**xargs)
Inject Correlator deployment package into the Correlator. |
source code
|
|
|
injectScenario(self,
filename,
filedir=None,
debug=False,
blocks=None,
functions=None,
**xargs)
Inject a Scenario into the Correlator. |
source code
|
|
|
injectQuery(self,
filename,
filedir=None,
diagnostics=False,
**xargs)
Inject a Query into the Correlator. |
source code
|
|
|
|
|
send(self,
filenames=[ ] ,
filedir=None,
loop=None,
utf8=False,
channel=None,
**xargs)
Send events from one or more file into the Correlator. |
source code
|
|
|
delete(self,
names=[ ] ,
filename=None,
filedir=None,
force=False,
kill=False,
all=False,
utf8=False,
**xargs)
Delete named objects from the Event Crrelator. |
source code
|
|
|
connect(self,
source,
channel=None,
channels=None,
mode=None,
**xargs)
Connect a Correlator to this instance as a source. |
source code
|
|
|
disconnect(self,
source,
channel=None,
channels=None,
mode=None,
**xargs)
Disconnect a correlator to this instance as a source correlator. |
source code
|
|
|
|
|
|
|
|
|
profilingOn(self,
**xargs)
Inform the Event Correlator to start collecting profiling statistics. |
source code
|
|
|
profilingOff(self,
**xargs)
Inform the Event Correlator to stop collecting profiling statistics. |
source code
|
|
|
profilingReset(self,
**xargs)
Inform the Event Correlator to reset it's collection of profiling
statistics. |
source code
|
|
|
profilingGet(self,
filename,
filedir=None,
**xargs)
Obtain the latest profiling statistics from the Event Correlator. |
source code
|
|
|
toStringAll(self,
filename,
filedir=None,
**xargs)
Obtain a stringified representation of the current application state
from the Event Correlator. |
source code
|
|
|
|
|
flush(self,
timeout=60,
count=1,
**xargs)
Make sure all events have been flushed through the correlator. |
source code
|
|
|
__inject(self,
filenames=[ ] ,
filedir=None,
utf8=False,
java=False,
cdp=False,
**xargs)
Inject an application into the correlator. |
source code
|
|
|
__createScenarioManagerConfig(self,
blocks=None,
functions=None)
Create the Scenario Manager configuration file for the location of
all blocks and functions. |
source code
|
|
Inherited from common.ApamaServerProcess :
__repr__ ,
manage ,
running ,
shutdown ,
waitForComponentUp
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|