def __init__(self, uri):
if isinstance(uri, str):
uri = core.URI(uri)
elif not isinstance(uri, core.URI):
raise TypeError("expected Pyro URI")
self._pyroUri = uri
self._pyroConnection = None
self._pyroSerializer = None # can be set to the name of a serializer to override the global one per-proxy
self._pyroMethods = set() # all methods of the remote object, gotten from meta-data
self._pyroAttrs = set() # attributes of the remote object, gotten from meta-data
self._pyroOneway = set() # oneway-methods of the remote object, gotten from meta-data
self._pyroSeq = 0 # message sequence number
self._pyroRawWireResponse = False # internal switch to enable wire level responses
self._pyroHandshake = "hello" # the data object that should be sent in the initial connection handshake message
self._pyroMaxRetries = config.MAX_RETRIES
self.__pyroTimeout = config.COMMTIMEOUT
self.__pyroOwnerThread = get_ident() # the thread that owns this proxy
if config.SERIALIZER not in serializers.serializers:
raise ValueError("unknown serializer configured")
core.current_context.annotations = {}
core.current_context.response_annotations = {}
评论列表
文章目录