本文整理汇总了Python中pyon.net.endpoint.RPCClient.create_endpoint方法的典型用法代码示例。如果您正苦于以下问题:Python RPCClient.create_endpoint方法的具体用法?Python RPCClient.create_endpoint怎么用?Python RPCClient.create_endpoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyon.net.endpoint.RPCClient
的用法示例。
在下文中一共展示了RPCClient.create_endpoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_endpoint
# 需要导入模块: from pyon.net.endpoint import RPCClient [as 别名]
# 或者: from pyon.net.endpoint.RPCClient import create_endpoint [as 别名]
def create_endpoint(self, to_name=None, existing_channel=None, **kwargs):
if not self._process:
raise StandardError("No Process specified")
newkwargs = kwargs.copy()
newkwargs['process'] = self._process
return RPCClient.create_endpoint(self, to_name, existing_channel, **newkwargs)
示例2: create_endpoint
# 需要导入模块: from pyon.net.endpoint import RPCClient [as 别名]
# 或者: from pyon.net.endpoint.RPCClient import create_endpoint [as 别名]
def create_endpoint(self, to_name=None, existing_channel=None, **kwargs):
if not self._process:
raise StandardError("No Process specified")
# upgrade to exchange object
if to_name is None and not isinstance(self._send_name, BaseTransport):
container = self._process.container or self._get_container_instance()
if not container:
raise StandardError("No container found, can not upgrade to ExchangeObject")
if self._declare_name:
self._send_name = container.create_service_xn(self._send_name)
# upgrade one timers too
if to_name is not None and not isinstance(to_name, BaseTransport):
container = self._process.container or self._get_container_instance()
if not container:
raise StandardError("No container found, can not upgrade to ExchangeObject")
if self._declare_name:
to_name = container.create_service_xn(to_name)
newkwargs = kwargs.copy()
newkwargs['process'] = self._process
return RPCClient.create_endpoint(self, to_name, existing_channel, **newkwargs)