def __init__(self, port): Container.__init__(self, port) self.__handler_map = { message_code.Request.status: self.__handler_status, message_code.Request.stop: self.__handler_stop, message_code.Request.score_load: self.__handler_score_load, message_code.Request.score_invoke: self.__handler_score_invoke, message_code.Request.score_query: self.__handler_score_query, message_code.Request.score_set: self.__handler_score_set, message_code.Request.score_connect: self.__handler_connect } self.__score = None self.__peer_id = None self.__stub_to_peer_service = None ObjectManager().score_service = self self.start()
def __init__(self, port): Container.__init__(self, port) self.__handler_map = { message_code.Request.status: self.__handler_status, message_code.Request.stop: self.__handler_stop, message_code.Request.tx_create: self.__handler_create_tx, message_code.Request.tx_connect_to_leader: self.__handler_connect_to_leader, message_code.Request.tx_connect_to_inner_peer: self.__handler_connect_to_inner_peer } self.__peer_id = None self.__stub_to_peer_service = None # ObjectManager().tx_service = self self.__stub_to_leader = None self.__stub_to_inner_peer = None self.__peer_status = PeerProcessStatus.normal self.__stored_tx = queue.Queue() self.start()
def __init__(self, port): Container.__init__(self, port, ServerType.REST_RS) self.start() # Container Runs RestServer.start()
def __init__(self, port, peer_ip=None): if peer_ip is None: peer_ip = conf.IP_LOCAL Container.__init__(self, port, ServerType.REST_PEER, peer_ip) self.start() # Container Runs RestServer.start()
def __init__(self, port, peer_ip=None): if peer_ip is None: peer_ip = util.get_private_ip() Container.__init__(self, port, ServerType.REST_PEER, peer_ip) self.start() # Container Runs RestServer.start()