apama.common module

Contains PySys extensions required by IAF and correlator support.

class apama.common.ApamaServerProcess(parent, name, port=None, host=None)[source]

Bases: object

Abstract parent helper class for Apama server processes.

Variables:
  • parent (pysys.basetest) – Reference to the PySys testcase instantiating this class instance
  • port (integer) – Port used for starting and interaction with the process
  • host (string) – Hostname for interaction with a remote process
  • environ (dictionary) – The environment for running the process
__init__(parent, name, port=None, host=None)[source]

Create an instance of the class.

If no port parameter is used in the argument list an available port will be dynamically found from the OS and used for starting the process, and performing all operations against it. The host parameter is only used to perform operations against a remote process started externally to the PySys framework - the class does not support the starting of a remote process.

Parameters:
  • parent – Reference to the parent PySys testcase
  • port – The port used for starting and interacting with the Correlator
  • host – The hostname used for interaction with a remote Correlator
manage(arguments=[], displayName='manage', **xargs)[source]

Execute component_management operations against the process.

Parameters:
  • arguments – The arguments to be passed to component_management
  • xargs – Optional startProcess keyword arguments, e.g. timeout, ignoreExitStatus, arguments, workingDir
running()[source]

Returns True if this has a local process that is running, or False if it has stopped, or was not started by this object.

shutdown(message='Shutdown requested by test', timeout=60, **args)[source]

Requests a clean shutdown of the component.

If it was started by this object, also waits for the process to terminate, and silently ignores requests to shutdown if the process was already stopped.

waitForComponentUp(timeout=60, **xargs)[source]

Block until the the component declares itself to be ready for processing.