class documentation

class Connection(object):

View In Hierarchy

Method __init__ Initializes a new Connection instance.
Property name The scenario name that this connection object attempts to connect with.
Property ephemeral A bool indicating whether sessions opened by this connection should be closed when closing the connection.
Method ephemeral.setter Property: The RevenServer instance opened using this connection.
Property 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
Instance Variable _pm Undocumented
Instance Variable _name Undocumented
Instance Variable _ephemeral Undocumented
Instance Variable _server Undocumented
Instance Variable _session_id Undocumented
def __init__(self, pm, name, ephemeral=True):

Initializes a new Connection instance.

Note

Prefer using ProjectManager.connect to get instances of this object.

Information

ParameterspmProjectManager instance
nameName of the scenario to connect to.
ephemeralBoolean indicating whether sessions opened by this connection should be closed when closing the connection
_pm =

Undocumented

_name =

Undocumented

_ephemeral =

Undocumented

_server =

Undocumented

_session_id =

Undocumented

@property
name =

The scenario name that this connection object attempts to connect with.

@property
ephemeral =

A bool indicating whether sessions opened by this connection should be closed when closing the connection.

@ephemeral.setter
def ephemeral(self, value):

Property: The RevenServer instance opened using this connection.

@property
server =

Property: The RevenServer instance opened using this connection.

def connect(self):

Get or spawn a new session to the scenario, and populate the underlying RevenServer object.

def disconnect(self):

Disconnect the underlying RevenServer instance, stopping the REVEN server if necessary.

The REVEN server is stopped if:

  • It was started by this connection object
  • ephemeral is set to True
def force_kill(self):

Immediately stop the remote server regardless of whether it was started by the current connection

Warning

Be careful when using this method, as it could stop servers to which other scripts and Axion sessions are currently connected.

def __enter__(self):

Called when using the 'with' syntax with a Connection instance.

def __exit__(self, exc_type, exc_value, exc_tb):

Called after a 'with' block using a Connection instance.

def __del__(self):

Called when the Connection instance is garbage-collected. Attempts to disconnect

API Documentation for reven2, generated by pydoctor 21.2.2 at 2021-04-08 12:32:07.