Package apama :: Module common :: Class XArgsHolder
[hide private]
[frames] | no frames]

Class XArgsHolder

source code


Deprecated: Internal helper class: do not use, will be removed in a future release.

Class to store all supported xargs method arguments used in the helper classes.

Methods in the Apama helper classes define process related methods with a signature including named parameters for the most commonly used options to the process, and an **xargs parameter to allow passing through of additional supported named parameters, e.g. workingDir, state, timeout, stdout, stderr and arguments. The XArgsHolder class takes the **xargs parameter from a method call (which is treated by python as a dictionary of name value pairs) and default values for the workingDir, state, timeout, stdout, stderr and arguments; these are used to set data attributes to the class instance with the default values. The class then iterates over the **xargs and over-writes the default values if they exist in the parameter. This allows a user of the class to create an instance to hold the additional arguments with default values in the first case, but for these to be replaced if an alternative value is supplied via **xargs, e.g. the user of the method wants to explicitly set the sdtout etc.

Instance Methods [hide private]
 
__init__(self, xargs, workingDir=None, state=11, timeout=None, stdout=None, stderr=None, arguments=[])
Create an instance of the XArgsHolder class.
source code
Method Details [hide private]

__init__(self, xargs, workingDir=None, state=11, timeout=None, stdout=None, stderr=None, arguments=[])
(Constructor)

source code 

Create an instance of the XArgsHolder class.

Parameters:
  • xargs - The variable argument list passed into the method
  • workingDir - The default value for the working directory of a process
  • state - The default state of the process (pysys.constants.BACKGROUND | pysys.constants.FOREGROUND)
  • timeout - The default value of the process timeout
  • stdout - The default value of the process stdout
  • stderr - The default value of the process stderr
  • arguments - List of extra arguments to be passed to the process