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
transport.ServerConnectionBuilder.ServerConnectionBuilder Class Reference

It's a wrapper for building server side endpoint. More...

Inheritance diagram for transport.ServerConnectionBuilder.ServerConnectionBuilder:
Collaboration diagram for transport.ServerConnectionBuilder.ServerConnectionBuilder:

Public Member Functions

def __init__ (self)
 constructor init global variable More...
 
def build (self, connect_params, socket_type=zmq.REP)
 build a server side connection may raise zmq.ZMQBindError More...
 

Public Attributes

 zmq_context
 
 zmq_poller
 

Detailed Description

It's a wrapper for building server side endpoint.

classdocs

Definition at line 14 of file ServerConnectionBuilder.py.

Constructor & Destructor Documentation

◆ __init__()

def transport.ServerConnectionBuilder.ServerConnectionBuilder.__init__ (   self)

constructor init global variable

Definition at line 22 of file ServerConnectionBuilder.py.

22  def __init__(self):
23  self.zmq_context = zmq.Context() # pylint: disable-msg=E1101
24  self.zmq_poller = zmq.Poller() # pylint: disable-msg=E1101
25 
26 
def __init__(self)
constructor
Definition: UIDGenerator.py:19

Member Function Documentation

◆ build()

def transport.ServerConnectionBuilder.ServerConnectionBuilder.build (   self,
  connect_params,
  socket_type = zmq.REP 
)

build a server side connection may raise zmq.ZMQBindError

Parameters
connect_paramsan instance of ConnectionParams
socket_typetype of zmq socket(zmq.REP, ..)
Returns
Connection

Definition at line 33 of file ServerConnectionBuilder.py.

33  def build(self, connect_params, socket_type=zmq.REP): # pylint: disable-msg=E1101,E0602
34  sock = self.zmq_context.socket(socket_type)
35  sock.bind(connect_params.host + ":" + str(connect_params.port))
36  return Connection(sock, self.zmq_poller)
37 

Member Data Documentation

◆ zmq_context

transport.ServerConnectionBuilder.ServerConnectionBuilder.zmq_context

Definition at line 23 of file ServerConnectionBuilder.py.

◆ zmq_poller

transport.ServerConnectionBuilder.ServerConnectionBuilder.zmq_poller

Definition at line 24 of file ServerConnectionBuilder.py.


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