HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
drce.ConnectionManager.ConnectionManager Class Reference

Simple wrapper that hide all routines related to create and destroy connections. More...

Inheritance diagram for drce.ConnectionManager.ConnectionManager:
Collaboration diagram for drce.ConnectionManager.ConnectionManager:

Public Member Functions

def __init__ (self)
 constructor More...
 
def create_connection (self, connect_params)
 create a data_connect_type connection More...
 
def destroy_connection (self, connection)
 destroy connection More...
 

Public Attributes

 builder
 

Detailed Description

Simple wrapper that hide all routines related to create and destroy connections.

Definition at line 16 of file ConnectionManager.py.

Constructor & Destructor Documentation

◆ __init__()

def drce.ConnectionManager.ConnectionManager.__init__ (   self)

constructor

Constructor

Definition at line 21 of file ConnectionManager.py.

21  def __init__(self):
22  '''
23  Constructor
24  '''
25  #@var builder
26  #a member variable, holds a connection builder object
27  self.builder = ConnectionBuilder(IDGenerator())
28 
29 
def __init__(self)
constructor
Definition: UIDGenerator.py:19

Member Function Documentation

◆ create_connection()

def drce.ConnectionManager.ConnectionManager.create_connection (   self,
  connect_params 
)

create a data_connect_type connection

Parameters
connectparams is transport.Connection.Connection_params
Returns
transport.Connection

Definition at line 34 of file ConnectionManager.py.

34  def create_connection(self, connect_params):
35  return self.builder.build(consts.DATA_CONNECT_TYPE, connect_params)
36 
37 

◆ destroy_connection()

def drce.ConnectionManager.ConnectionManager.destroy_connection (   self,
  connection 
)

destroy connection

Returns
None

Definition at line 41 of file ConnectionManager.py.

41  def destroy_connection(self, connection):
42  connection.close()
43 
44 
45 
46 

Member Data Documentation

◆ builder

drce.ConnectionManager.ConnectionManager.builder

Definition at line 27 of file ConnectionManager.py.


The documentation for this class was generated from the following file: