本文整理汇总了Python中rpclib.server.ServerBase.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ServerBase.__init__方法的具体用法?Python ServerBase.__init__怎么用?Python ServerBase.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rpclib.server.ServerBase
的用法示例。
在下文中一共展示了ServerBase.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from rpclib.server import ServerBase [as 别名]
# 或者: from rpclib.server.ServerBase import __init__ [as 别名]
def __init__(self, app):
ServerBase.__init__(self, app)
self._allowed_http_verbs = app.in_protocol.allowed_http_verbs
self._verb_handlers = {
"GET": self.handle_rpc,
"POST": self.handle_rpc,
}
示例2: __init__
# 需要导入模块: from rpclib.server import ServerBase [as 别名]
# 或者: from rpclib.server.ServerBase import __init__ [as 别名]
def __init__(self, app, app_url, wsdl_url=None):
ServerBase.__init__(self, app)
self.app_url = app_url
self.wsdl_url = wsdl_url
self.soap_socket = context.socket(zmq.REP)
self.soap_socket.bind(app_url)
示例3: __init__
# 需要导入模块: from rpclib.server import ServerBase [as 别名]
# 或者: from rpclib.server.ServerBase import __init__ [as 别名]
def __init__(self, app):
ServerBase.__init__(self, app)
self._allowed_http_verbs = app.in_protocol.allowed_http_verbs
self._verb_handlers = {
"GET": self.handle_rpc,
"POST": self.handle_rpc,
}
self._mtx_build_interface_document = threading.Lock()
示例4: __init__
# 需要导入模块: from rpclib.server import ServerBase [as 别名]
# 或者: from rpclib.server.ServerBase import __init__ [as 别名]
def __init__(self, app, chunked=False,
max_content_length=2 * 1024 * 1024,
block_length=8 * 1024):
ServerBase.__init__(self, app)
self._allowed_http_verbs = app.in_protocol.allowed_http_verbs
self.chunked = chunked
self.max_content_length = max_content_length
self.block_length = block_length
示例5: __init__
# 需要导入模块: from rpclib.server import ServerBase [as 别名]
# 或者: from rpclib.server.ServerBase import __init__ [as 别名]
def __init__(self, db, app, consumer_id):
ServerBase.__init__(self, app)
self.session = sessionmaker(bind=db)()
self.id = consumer_id
try:
self.session.query(WorkerStatus) \
.filter_by(worker_id=self.id).one()
except NoResultFound:
self.session.add(WorkerStatus(worker_id=self.id, task_id=0))
self.session.commit()
示例6: __init__
# 需要导入模块: from rpclib.server import ServerBase [as 别名]
# 或者: from rpclib.server.ServerBase import __init__ [as 别名]
def __init__(self, app):
ServerBase.__init__(self, app)
self.service = _FunctionProxy(self, self.app)
self.factory = Factory(self.app)
示例7: __init__
# 需要导入模块: from rpclib.server import ServerBase [as 别名]
# 或者: from rpclib.server.ServerBase import __init__ [as 别名]
def __init__(self, app):
ServerBase.__init__(self, app)
self._allowed_http_verbs = app.in_protocol.allowed_http_verbs