utilities - session
The session module provides functions for getting information about a session
Functions
Function | Parameters | Return Value | Description |
---|---|---|---|
get_session_user | session_id: The numerical identifier of a session | The user id for the specified session | Can raise the following exceptions: |
get_session_info | session_id: The numerical identifier of a session | Returns a | The SessionInfo object has the following attributes: Can raise the following exception: |
open_clientless_session | user: The user logged into the session | Returns a unique ID of the new clientless session | Starts a clientless session on behalf of a user The session stays open until closeClientlessSession is called. Can raise the following exception: |
close_clientless_session( | Closes a clientless session Can raise the following exception: | ||
Classes
ClientlessSession
Class | Parameters | Description |
---|---|---|
ClientlessSession | user: The user logged into the session | Context manager for clientless sessions The clientless session is sent a shutdown command when the context is left. If there are still modules running in the session they first need to conclude before the session is shutdown. Example usage:
PY
|
Methods
Function | Parameters | Return values | Description |
---|---|---|---|
ClientlessSession.open_module | module_id: The ID of the module to open parameters: An optional dictionary of parameters that will be passed to | Open a module in the specified clientless sessios Can raise the following exceptions:
| |
ClientlessSession.get_return_value | module_id: The ID of the module that was opened and should be polled timeout: Amount of seconds to wait until timing out | Fetches the return value of a module in the specified clientless session Fetches the return value of
Can raise the following exceptions:
|
PersistentClientlessSession
Class | Parameters | Description |
---|---|---|
PersistentClientlessSession | user: The user logged into the session | Context manager for persistent clientless sessions In contrast to the ClientlessSession context manager, where the session is exited when the context is exited, with PersistentClientlessSession the session remains open when the context is exited. |
Methods
Function | Parameters | Return values | Description |
---|---|---|---|
PersistentClientlessSession.open_module | module_id: The ID of the module to open parameters: An optional dictionary of parameters that will be passed to | Open a module in the persistent clientless session. This method only accepts macro modules, as modules of other classes would not be cleaned up properly. Can raise the following exceptions:
| |
PersistentClientlessSession.get_return_value | module_id: The ID of the module that was opened and should be polled timeout: Amount of seconds to wait until timing out | Fetches the return value of a module in the specified persistent clientless session Fetches the return value of
Can raise the following exceptions:
| |
PersistentClientlessSession.close_clientless_session | Closes the clientless session if it is still open |
Functions
Function | Parameters | Return Value | Description |
---|---|---|---|
get_user_context | Gets the current user context of this jython session | ||
set_user_context | Sets the current user context of this jython session |
Classes
Class | Description |
---|---|
UserContext | Context manager for setting the user context of the current jython session Example usage:
PY
|