reven2.preview.project_manager._connect.Connection(object)
class documentationreven2.preview.project_manager._connect
(View In Hierarchy)
Method | __init__ | Initializes a new Connection
instance. |
Method | name | The scenario name that this connection object attempts to connect with. |
Method | ephemeral 0 | A bool indicating whether sessions opened by this
connection should be closed when closing the connection. |
Method | ephemeral | Property: The RevenServer
instance opened using this connection. |
Method | server | Property: The RevenServer
instance opened using this connection. |
Method | connect | Get or spawn a new session to the scenario, and populate the underlying
RevenServer
object. |
Method | disconnect | Disconnect the underlying RevenServer
instance, stopping the REVEN server if necessary. |
Method | force_kill | Immediately stop the remote server regardless of whether it was started by the current connection |
Method | __enter__ | Called when using the 'with' syntax with a Connection
instance. |
Method | __exit__ | Called after a 'with' block using a Connection
instance. |
Method | __del__ | Called when the Connection
instance is garbage-collected. Attempts to disconnect |
Initializes a new Connection
instance.
Prefer using ProjectManager.connect
to get instances of this object.
Parameters | pm | ProjectManager
instance |
name | Name of the scenario to connect to. | |
ephemeral | Boolean indicating whether sessions opened by this connection should be closed when closing the connection |
A bool
indicating whether sessions opened by this
connection should be closed when closing the connection.
Property: The RevenServer
instance opened using this connection.
Get or spawn a new session to the scenario, and populate the underlying
RevenServer
object.
Disconnect the underlying RevenServer
instance, stopping the REVEN server if necessary.
The REVEN server is stopped if:
ephemeral
is set to True
Immediately stop the remote server regardless of whether it was started by the current connection
Be careful when using this method, as it could stop servers to which other scripts and Axion sessions are currently connected.
Called after a 'with' block using a Connection
instance.