Interface of the Container. More...
import"SALOME_Component.idl";
Public Member Functions | |
void | override_environment (in FieldsDict env) |
void | override_environment_python (in FieldsDict env) |
FieldsDict | get_os_environment () |
void | execute_python_code (in string code) raises (SALOME::SALOME_Exception) |
boolean | load_component_Library (in string componentName, out string reason) |
Loads a new component class (dynamic library). More... | |
Engines::EngineComponent | create_component_instance (in string componentName) |
Create a new servant instance of a component. More... | |
string | create_python_service_instance (in string serviceName, out string reason) |
Create a new Python servant instance of a generic service. More... | |
Engines::EngineComponent | create_component_instance_env (in string componentName, in FieldsDict env, out string reason) |
Create a new servant instance of a component with environment variables specified. More... | |
EngineComponent | find_component_instance (in string registeredName) |
Find a servant instance of a component. More... | |
EngineComponent | load_impl (in string nameToRegister, in string componentName) |
Find a servant instance of a component, or create a new one. More... | |
void | remove_impl (in EngineComponent component_i) |
Remove the component servant, and deletes all related objects. More... | |
EmbeddedNamingService | get_embedded_NS_if_ssl () |
In case of SSL mode Returns entry to Embedded NS. More... | |
boolean | is_SSL_mode () |
void | finalize_removal () |
Unload component libraries from the container. More... | |
void | ping () |
Determines whether the server has been loaded or not. More... | |
void | Shutdown () |
Shutdown the Container process. More... | |
string | getHostName () |
Returns the hostname of the container. More... | |
long | getPID () |
Returns the PID of the container. More... | |
boolean | Kill_impl () |
Kill the container. More... | |
fileRef | createFileRef (in string origFileName) |
Create a fileRef. More... | |
Salome_file | createSalome_file (in string origFileName) |
Create a Salome_file. More... | |
fileTransfer | getFileTransfer () |
Create a fileTransfer. More... | |
void | copyFile (in Container contai, in string remoteFile, in string localFile) |
Copy a file from a remote host (container) to a local file. More... | |
PyNode | createPyNode (in string nodeName, in string code) raises (SALOME::SALOME_Exception) |
Create a PyNode in the container. More... | |
PyNode | getDefaultPyNode (in string nodeName) |
Retrieves the last created PyNode instance with createPyNode. More... | |
PyScriptNode | createPyScriptNode (in string nodeName, in string code) raises (SALOME::SALOME_Exception) |
Create a PyScriptNode in the container. More... | |
void | removePyScriptNode (in string nodeName) raises (SALOME::SALOME_Exception) |
PyScriptNode | getDefaultPyScriptNode (in string nodeName) |
Retrieves the last created PyScriptNode instance with createPyScriptNode. More... | |
void | cleanAllPyScripts () |
This method remove all refs of PyScriptNode servant objects stored in server. More... | |
long | getNumberOfCPUCores () |
Return number of CPU cores in the calculation node. More... | |
vectorOfDouble | loadOfCPUCores () raises (SALOME::SALOME_Exception) |
Return a load of each CPU core. More... | |
void | setPyScriptForCPULoad (in string script) |
Set custom script to calculate a load of each CPU core. More... | |
void | resetScriptForCPULoad () |
Nullify custom script to calculate each CPU core's load. More... | |
long | getTotalPhysicalMemory () |
Get total physical memory of calculation node, in megabytes. More... | |
long | getTotalPhysicalMemoryInUse () |
Get used physical memory of calculation node, in megabytes. More... | |
long | getTotalPhysicalMemoryInUseByMe () |
Obtain physical memory, used by the current process, in megabytes. More... | |
Data Fields | |
readonly attribute string | name |
Name of the container. More... | |
readonly attribute string | workingdir |
working directory of the container More... | |
attribute string | logfilename |
name of the container log file (this has been set by the launcher) More... | |
Interface of the Container.
This interface defines the process of loading and registration of new components in SALOME application
void Engines::Container::cleanAllPyScripts | ( | ) |
This method remove all refs of PyScriptNode servant objects stored in server.
Previous scripts created on container may have been stored in a map. This method removes them. It then clean all the contexts dict attached to them.
void Engines::Container::copyFile | ( | in Container | contai, |
in string | remoteFile, | ||
in string | localFile | ||
) |
Copy a file from a remote host (container) to a local file.
contai | the remote container |
remoteFile | the file on the remote host to copy |
localFile | the local file to create by copy |
Engines::EngineComponent Engines::Container::create_component_instance | ( | in string | componentName | ) |
Create a new servant instance of a component.
Component library must be loaded.
componentName | Name of the component which will be registered in Registry and Name Service, (instance number suffix added to the registered name) |
Referenced by SALOME_ContainerPy.SALOME_ContainerPy_Gen_i::create_component_instance_env(), and SALOME_ContainerPy.SALOME_ContainerPy_Gen_i::create_python_service_instance().
Engines::EngineComponent Engines::Container::create_component_instance_env | ( | in string | componentName, |
in FieldsDict | env, | ||
out string | reason | ||
) |
Create a new servant instance of a component with environment variables specified.
Component library must be loaded.
componentName | Name of the component which will be registered in Registry and Name Service, (instance number suffix added to the registered name) |
env | a dict of env variables |
reason | in case of error (return nil) a string explaining the error |
string Engines::Container::create_python_service_instance | ( | in string | serviceName, |
out string | reason | ||
) |
Create a new Python servant instance of a generic service.
This simply loads the service in the current container by importing the corresponding Python module. Warning: no internal registration is done, so it is up to the caller to manage the various instantiation.
serviceName | Name of the service |
reason | in case of error (return void string) a string explaining the error |
fileRef Engines::Container::createFileRef | ( | in string | origFileName | ) |
PyNode Engines::Container::createPyNode | ( | in string | nodeName, |
in string | code | ||
) | |||
raises | ( | SALOME::SALOME_Exception | |
) |
PyScriptNode Engines::Container::createPyScriptNode | ( | in string | nodeName, |
in string | code | ||
) | |||
raises | ( | SALOME::SALOME_Exception | |
) |
Create a PyScriptNode in the container.
nodeName | the name of the PyScriptNode |
code | python code as text to load in the node |
Salome_file Engines::Container::createSalome_file | ( | in string | origFileName | ) |
Create a Salome_file.
returns a Salome_file object if origFileName exists and is readable else returns null object.
origFileName | name of the file to be managed (can contain the path). |
void Engines::Container::execute_python_code | ( | in string | code | ) | |
raises | ( | SALOME::SALOME_Exception | |||
) |
void Engines::Container::finalize_removal | ( | ) |
Unload component libraries from the container.
EngineComponent Engines::Container::find_component_instance | ( | in string | registeredName | ) |
Find a servant instance of a component.
registeredName | Name of the component in Registry or Name Service, without instance suffix number |
EmbeddedNamingService Engines::Container::get_embedded_NS_if_ssl | ( | ) |
In case of SSL mode Returns entry to Embedded NS.
FieldsDict Engines::Container::get_os_environment | ( | ) |
PyNode Engines::Container::getDefaultPyNode | ( | in string | nodeName | ) |
Retrieves the last created PyNode instance with createPyNode.
PyScriptNode Engines::Container::getDefaultPyScriptNode | ( | in string | nodeName | ) |
Retrieves the last created PyScriptNode instance with createPyScriptNode.
fileTransfer Engines::Container::getFileTransfer | ( | ) |
Create a fileTransfer.
returns a fileTransfer object used to copy files from the container machine to the clients machines. Only one fileTransfer instance is created in a container.
string Engines::Container::getHostName | ( | ) |
Returns the hostname of the container.
long Engines::Container::getNumberOfCPUCores | ( | ) |
Return number of CPU cores in the calculation node.
long Engines::Container::getPID | ( | ) |
Returns the PID of the container.
long Engines::Container::getTotalPhysicalMemory | ( | ) |
Get total physical memory of calculation node, in megabytes.
long Engines::Container::getTotalPhysicalMemoryInUse | ( | ) |
Get used physical memory of calculation node, in megabytes.
long Engines::Container::getTotalPhysicalMemoryInUseByMe | ( | ) |
Obtain physical memory, used by the current process, in megabytes.
boolean Engines::Container::is_SSL_mode | ( | ) |
boolean Engines::Container::Kill_impl | ( | ) |
Kill the container.
Returns True if the container has been killed. Kept for Superv compilation but can't work, unless oneway... TO REMOVE !
boolean Engines::Container::load_component_Library | ( | in string | componentName, |
out string | reason | ||
) |
Loads a new component class (dynamic library).
componentName | like COMPONENT, (Python or C++ implementation) try to make a Python import of COMPONENT, then a lib open of libCOMPONENTEngine.so |
reason | in case of error (return false) a string explaining the error |
EngineComponent Engines::Container::load_impl | ( | in string | nameToRegister, |
in string | componentName | ||
) |
Find a servant instance of a component, or create a new one.
Loads the component library if needed. Only applicable to multiStudy components.
nameToRegister | Name of the component which will be registered in Registry (or Name Service) |
componentName | Name of the constructed library of the component (not used any more, give empty string) |
vectorOfDouble Engines::Container::loadOfCPUCores | ( | ) | ||
raises | ( | SALOME::SALOME_Exception | ||
) |
Return a load of each CPU core.
void Engines::Container::override_environment | ( | in FieldsDict | env | ) |
void Engines::Container::override_environment_python | ( | in FieldsDict | env | ) |
void Engines::Container::ping | ( | ) |
Determines whether the server has been loaded or not.
void Engines::Container::remove_impl | ( | in EngineComponent | component_i | ) |
Remove the component servant, and deletes all related objects.
component_i | Component to be removed |
void Engines::Container::removePyScriptNode | ( | in string | nodeName | ) | |
raises | ( | SALOME::SALOME_Exception | |||
) |
void Engines::Container::resetScriptForCPULoad | ( | ) |
Nullify custom script to calculate each CPU core's load.
void Engines::Container::setPyScriptForCPULoad | ( | in string | script | ) |
Set custom script to calculate a load of each CPU core.
script | Python script to execute |
void Engines::Container::Shutdown | ( | ) |
Shutdown the Container process.
attribute string Engines::Container::logfilename |
name of the container log file (this has been set by the launcher)
readonly attribute string Engines::Container::name |
Name of the container.
Referenced by IDLparser.Tree::__repr__(), IDLparser.Tree::getNode(), and IDLparser.Tree::output_xml().
readonly attribute string Engines::Container::workingdir |
working directory of the container