Module EDPluginControl :: Class EDPluginControl
[hide private]
[frames] | no frames]

Class EDPluginControl

source code

        object --+                
                 |                
 EDObject.EDObject --+            
                     |            
   EDLogging.EDLogging --+        
                         |        
        object --+       |        
                 |       |        
threading._Verbose --+   |        
                     |   |        
      threading.Thread --+        
                         |        
         EDAction.EDAction --+    
                             |    
             EDPlugin.EDPlugin --+
                                 |
                                EDPluginControl

An EDPluginControl is a plugin that is responsible for a EDPluginExec or EDPluginControl plugin execution: It is responsible for:

Instance Methods [hide private]
 
__init__(self)
Initializes plugin related attributes described above
source code
 
configure(self)
Gets the EDPluginControl parameters from the configuration file and stores them in class member attributes.
source code
 
emptyListOfLoadedPlugin(self)
Reset all plugins kept in memory
source code
 
getListOfLoadedPlugin(self) source code
 
removeLoadedPlugin(self, _plugin)
Remove a plugin from the list of loaded plugins to free some memory
source code
 
synchronizePlugins(self) source code
 
loadPlugins(self)
This method loads and returns a list of references to the plugins to be controlled.
source code
 
loadPlugin(self, _strPluginToBeControlledName=None, _strBaseName=None)
This method loads and returns a reference to the plugin to be controlled.
source code
 
setControlledPluginName(self, _strControlledPluginName, _strControlledPluginValue)
Adds a name-value pair to the dictionary to map the general to the specific name of a plugin to be controlled
source code
 
getControlledPluginName(self, _strControlledPluginName)
Returns the name of the plugin to be controlled.
source code
 
addWarningMessages(self, _listWarningMessages)
Adds a list of warning messages in the existing list of warning messages
source code
 
addErrorMessages(self, _listErrorMessages)
Adds a list of error messages in the existing list of error messages
source code
 
retrieveFailureMessages(self, _edPlugin, _strMethodCaller)
Propagates failure messages from a plugin including unexpected errors Should be called in the plugin control method invoked when a plugin exec fails (doActionFailure<>)
source code
 
retrieveSuccessMessages(self, _edPlugin, _strMethodCaller)
Propagates success messages from a plugin Error messages are retrieved because a plugin could end successfully with errors (depending on the use case) In this case, there is no check for unexpected errors
source code
 
retrieveErrorMessages(self, _edPlugin, _strMethodCaller, _bFailure)
Propagates error messages from a plugin if _bFailure is true, this method has been called from retrieveFailureMessages in this case, checks for potential unexpected errors coming from the EDPluginExec
source code
 
retrieveWarningMessages(self, _edPlugin)
Propagates warning messages from a plugin
source code
 
appendExecutiveSummary(self, _edPlugin, _strPrefix='', _bAddSeparator=True)
Appends the executive summary from a plugin.
source code
 
addErrorWarningMessagesToExecutiveSummary(self, _strErrorMessage='Error messages:', _strWarningMessage='Warning messages:')
Adds error and warning messages (if any) in the executive summary
source code
 
addPluginToActionCluster(self, _edPlugin)
This method adds a plugin instance to an action cluster.
source code
 
executeActionCluster(self)
This method executes the action cluster.
source code
 
synchronizeActionCluster(self)
This method synchronises the action cluster with the control plugin thread.
source code
 
setClusterSize(self, _iClusterSize)
This method sets the size of the action cluster, i.e.
source code
 
executePlugin(self, _edPlugin, _bSynchronous=False)
This method is used to start executable plugins in pipeline asynchronously.
source code
 
executePluginSynchronous(self, _edPlugin)
This method is used to start executable plugins in pipeline synchronously.
source code

Inherited from EDPlugin.EDPlugin: ERROR, addErrorMessage, addExecutiveSummaryLine, addExecutiveSummarySeparator, addWarningMessage, checkDataOutput, checkImportantParameters, checkMandatoryParameters, checkParameters, compactPluginName, connectExportDataOutput, createBaseName, delDataInput, delDataOutput, error, execute, exportDataOutput, generateExecutiveSummary, getBaseDirectory, getBaseName, getConfig, getConfiguration, getDataInput, getDataOutput, getDefaultInputDataKey, getDefaultOutputDataKey, getDoubleConfigurationParameterValue, getErrorMessages, getExecutiveSummarySeparator, getIntegerConfigurationParameterValue, getListExecutiveSummaryLines, getListOfDataInputKeys, getListOfDataOutputKeys, getListOfErrorMessages, getListOfWarningMessages, getPluginName, getStringConfigurationParameterValue, getWarningMessages, getWorkingDirectory, getXSDataInputClass, hasDataInput, hasDataOutput, isRequiredToHaveConfiguration, preProcess, setBaseDirectory, setBaseName, setConfig, setConfiguration, setDataInput, setDataOutput, setRequiredToHaveConfiguration, setUseWarningInsteadOfError, setWorkingDirectory, setWriteXMLInput, setWriteXMLInputOutput, setWriteXMLOutput, setXSDataInputClass, synchronize, tellFinished, verboseDebug, verboseScreenExecutiveSummary, writeDataInput, writeDataOutput

Inherited from EDAction.EDAction: abort, addExtraTime, connectFAILURE, connectFinallyProcess, connectPostProcess, connectPreProcess, connectProcess, connectSUCCESS, executeAction, executeActionSynchronous, executeKernel, executeSynchronous, finallyProcess, getDefaultTimeOut, getLogTiming, getSlotFAILURE, getSlotSUCCESS, getTimeOut, hasTimedOut, isEnded, isFailure, isRunning, isStarted, isTimeOut, postProcess, process, run, setFailure, setLogTiming, setTimeOut

Inherited from EDLogging.EDLogging: ASSERT, DEBUG, WARNING, isVerboseDebug, log, screen, setAllLogLevels, setLogFileName, setLogFileOff, setLogLevel, setTestOff, setTestOn, setVerboseDebugOff, setVerboseDebugOn, setVerboseOff, setVerboseOn, unitTest, warning, writeErrorTrace

Inherited from EDObject.EDObject: getClassName, getId, getRunTime, getSemaphoreValue, getTimeEnd, getTimeInit, locked, setTimeEnd, setTimeInit, synchronizeOff, synchronizeOn

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from EDPlugin.EDPlugin: CONF_BASE_DIR_LABEL, CONF_TIME_OUT, CONF_WORKING_DIR_LABEL, CONF_WRITE_XML_INPUT, CONF_WRITE_XML_INPUT_OUTPUT, CONF_WRITE_XML_OUTPUT

Inherited from EDLogging.EDLogging (private): _EDObject__iId_class

Properties [hide private]

Inherited from EDPlugin.EDPlugin: config, configuration, dataInput, dataOutput

Inherited from EDAction.EDAction: logTiming

Inherited from threading.Thread: daemon, ident, name

Inherited from threading.Thread (private): _block

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initializes plugin related attributes described above

Overrides: object.__init__

configure(self)

source code 

Gets the EDPluginControl parameters from the configuration file and stores them in class member attributes.

Overrides: EDPlugin.EDPlugin.configure

removeLoadedPlugin(self, _plugin)

source code 

Remove a plugin from the list of loaded plugins to free some memory

Parameters:
  • _plugin (instance of the class EDPlugin) - plugin to remove

loadPlugins(self)

source code 

This method loads and returns a list of references to the plugins to be controlled.

The name of the plugin to be controlled is set set before calling this method using the "setControlledPluginName" method.

The base name of the plugin to be controlled is used as the working directory name of the plugin in question. The name of the plugin is used as base name.

loadPlugin(self, _strPluginToBeControlledName=None, _strBaseName=None)

source code 

This method loads and returns a reference to the plugin to be controlled.

The name of the plugin to be controlled can either be passed as an argument, or bet set before calling this method using the "setPluginToBeControlledName".

The base name of the plugin to be controlled is used as the working directory name of the plugin in question. If no argument is supplied the name of the plugin is used as base name. In the case of creation of several plugins to be launched simultaneously, the base name should be different for each plugin and hence must be provided explicitly.

executeActionCluster(self)

source code 

This method executes the action cluster. The action cluster is executed asynchronoulsy.

setClusterSize(self, _iClusterSize)

source code 

This method sets the size of the action cluster, i.e. the number of threads that will be executed simultaneously.