body
stringlengths 26
98.2k
| body_hash
int64 -9,222,864,604,528,158,000
9,221,803,474B
| docstring
stringlengths 1
16.8k
| path
stringlengths 5
230
| name
stringlengths 1
96
| repository_name
stringlengths 7
89
| lang
stringclasses 1
value | body_without_docstring
stringlengths 20
98.2k
|
|---|---|---|---|---|---|---|---|
def runMainLoop(self, fileName=None):
'The main loop for the browser gui.'
if fileName:
print(('LeoWapp running: %s...' % g.shortFileName(fileName)))
else:
print('LeoWapp running...')
if 0:
path = g.os_path_finalize_join(g.app.loadDir, '..', 'test', 'unittest.leo')
c = g.openWithFileName(path, gui=self)
c.findCommands.ftm = g.NullObject()
c.debugCommands.runAllUnitTestsLocally()
print('calling sys.exit(0)')
sys.exit(0)
| 9,157,870,750,199,176,000
|
The main loop for the browser gui.
|
leo/plugins/leowapp.py
|
runMainLoop
|
Anu082000/leo-editor
|
python
|
def runMainLoop(self, fileName=None):
if fileName:
print(('LeoWapp running: %s...' % g.shortFileName(fileName)))
else:
print('LeoWapp running...')
if 0:
path = g.os_path_finalize_join(g.app.loadDir, '..', 'test', 'unittest.leo')
c = g.openWithFileName(path, gui=self)
c.findCommands.ftm = g.NullObject()
c.debugCommands.runAllUnitTestsLocally()
print('calling sys.exit(0)')
sys.exit(0)
|
def __init__(self, lower=0, upper=0, upper_includes_max=False):
'\n any number within this range should be greater than or equal to self.lower and \n less than (or less than equal to depending on whether it includes the max) self.upper\n '
self.__delta_added = False
if (upper < lower):
raise se.SystemError((((('Lower limit ' + str(lower)) + ' cannot be greater than the Upper limit ') + str(upper)) + ' in a range'))
self.__uninitialized = False
if (upper == lower == 0):
self.__uninitialized = True
(self.lower, self.upper, self.__delta_added) = (lower, upper, False)
if upper_includes_max:
self.upper += DELTA
self.__delta_added = True
| -3,794,609,965,976,782,000
|
any number within this range should be greater than or equal to self.lower and
less than (or less than equal to depending on whether it includes the max) self.upper
|
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/classifier/numrange.py
|
__init__
|
hectormartinez/rougexstem
|
python
|
def __init__(self, lower=0, upper=0, upper_includes_max=False):
'\n any number within this range should be greater than or equal to self.lower and \n less than (or less than equal to depending on whether it includes the max) self.upper\n '
self.__delta_added = False
if (upper < lower):
raise se.SystemError((((('Lower limit ' + str(lower)) + ' cannot be greater than the Upper limit ') + str(upper)) + ' in a range'))
self.__uninitialized = False
if (upper == lower == 0):
self.__uninitialized = True
(self.lower, self.upper, self.__delta_added) = (lower, upper, False)
if upper_includes_max:
self.upper += DELTA
self.__delta_added = True
|
def uncache(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.uncache`\n '
self._serialized = {}
| -5,430,352,027,742,889,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.uncache`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
uncache
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def uncache(self):
'\n \n '
self._serialized = {}
|
def serialize(self, serializer):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.serialize`\n '
if (not (serializer in self._serialized)):
self._serialized[serializer] = serializer.serialize(self.marshal())
return self._serialized[serializer]
| -967,456,505,477,449,700
|
Implements :func:`autobahn.wamp.interfaces.IMessage.serialize`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
serialize
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def serialize(self, serializer):
'\n \n '
if (not (serializer in self._serialized)):
self._serialized[serializer] = serializer.serialize(self.marshal())
return self._serialized[serializer]
|
def __init__(self, realm, roles, authmethods=None, authid=None):
'\n\n :param realm: The URI of the WAMP realm to join.\n :type realm: unicode\n :param roles: The WAMP roles to announce.\n :type roles: list of :class:`autobahn.wamp.role.RoleFeatures`\n :param authmethods: The authentication methods to announce.\n :type authmethods: list of unicode or None\n :param authid: The authentication ID to announce.\n :type authid: unicode or None\n '
assert (type(realm) == six.text_type)
assert (type(roles) == list)
for role in roles:
assert isinstance(role, autobahn.wamp.role.RoleFeatures)
if authmethods:
assert (type(authmethods) == list)
for authmethod in authmethods:
assert (type(authmethod) == six.text_type)
assert ((authid is None) or (type(authid) == six.text_type))
Message.__init__(self)
self.realm = realm
self.roles = roles
self.authmethods = authmethods
self.authid = authid
| -663,785,122,638,179,500
|
:param realm: The URI of the WAMP realm to join.
:type realm: unicode
:param roles: The WAMP roles to announce.
:type roles: list of :class:`autobahn.wamp.role.RoleFeatures`
:param authmethods: The authentication methods to announce.
:type authmethods: list of unicode or None
:param authid: The authentication ID to announce.
:type authid: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, realm, roles, authmethods=None, authid=None):
'\n\n :param realm: The URI of the WAMP realm to join.\n :type realm: unicode\n :param roles: The WAMP roles to announce.\n :type roles: list of :class:`autobahn.wamp.role.RoleFeatures`\n :param authmethods: The authentication methods to announce.\n :type authmethods: list of unicode or None\n :param authid: The authentication ID to announce.\n :type authid: unicode or None\n '
assert (type(realm) == six.text_type)
assert (type(roles) == list)
for role in roles:
assert isinstance(role, autobahn.wamp.role.RoleFeatures)
if authmethods:
assert (type(authmethods) == list)
for authmethod in authmethods:
assert (type(authmethod) == six.text_type)
assert ((authid is None) or (type(authid) == six.text_type))
Message.__init__(self)
self.realm = realm
self.roles = roles
self.authmethods = authmethods
self.authid = authid
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Hello.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for HELLO'.format(len(wmsg)))
realm = check_or_raise_uri(wmsg[1], "'realm' in HELLO")
details = check_or_raise_extra(wmsg[2], "'details' in HELLO")
roles = []
if (not (u'roles' in details)):
raise ProtocolError('missing mandatory roles attribute in options in HELLO')
details_roles = check_or_raise_extra(details[u'roles'], "'roles' in 'details' in HELLO")
if (len(details_roles) == 0):
raise ProtocolError("empty 'roles' in 'details' in HELLO")
for role in details_roles:
if (role not in ROLE_NAME_TO_CLASS):
raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in HELLO".format(role))
role_cls = ROLE_NAME_TO_CLASS[role]
details_role = check_or_raise_extra(details_roles[role], "role '{0}' in 'roles' in 'details' in HELLO".format(role))
if (u'features' in details_role):
check_or_raise_extra(details_role[u'features'], "'features' in role '{0}' in 'roles' in 'details' in HELLO".format(role))
role_features = role_cls(**details_role[u'features'])
else:
role_features = role_cls()
roles.append(role_features)
authmethods = None
if (u'authmethods' in details):
details_authmethods = details[u'authmethods']
if (type(details_authmethods) != list):
raise ProtocolError("invalid type {0} for 'authmethods' detail in HELLO".format(type(details_authmethods)))
for auth_method in details_authmethods:
if (type(auth_method) != six.text_type):
raise ProtocolError("invalid type {0} for item in 'authmethods' detail in HELLO".format(type(auth_method)))
authmethods = details_authmethods
authid = None
if (u'authid' in details):
details_authid = details[u'authid']
if (type(details_authid) != six.text_type):
raise ProtocolError("invalid type {0} for 'authid' detail in HELLO".format(type(details_authid)))
authid = details_authid
obj = Hello(realm, roles, authmethods, authid)
return obj
| -9,074,264,159,924,783,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Hello.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for HELLO'.format(len(wmsg)))
realm = check_or_raise_uri(wmsg[1], "'realm' in HELLO")
details = check_or_raise_extra(wmsg[2], "'details' in HELLO")
roles = []
if (not (u'roles' in details)):
raise ProtocolError('missing mandatory roles attribute in options in HELLO')
details_roles = check_or_raise_extra(details[u'roles'], "'roles' in 'details' in HELLO")
if (len(details_roles) == 0):
raise ProtocolError("empty 'roles' in 'details' in HELLO")
for role in details_roles:
if (role not in ROLE_NAME_TO_CLASS):
raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in HELLO".format(role))
role_cls = ROLE_NAME_TO_CLASS[role]
details_role = check_or_raise_extra(details_roles[role], "role '{0}' in 'roles' in 'details' in HELLO".format(role))
if (u'features' in details_role):
check_or_raise_extra(details_role[u'features'], "'features' in role '{0}' in 'roles' in 'details' in HELLO".format(role))
role_features = role_cls(**details_role[u'features'])
else:
role_features = role_cls()
roles.append(role_features)
authmethods = None
if (u'authmethods' in details):
details_authmethods = details[u'authmethods']
if (type(details_authmethods) != list):
raise ProtocolError("invalid type {0} for 'authmethods' detail in HELLO".format(type(details_authmethods)))
for auth_method in details_authmethods:
if (type(auth_method) != six.text_type):
raise ProtocolError("invalid type {0} for item in 'authmethods' detail in HELLO".format(type(auth_method)))
authmethods = details_authmethods
authid = None
if (u'authid' in details):
details_authid = details[u'authid']
if (type(details_authid) != six.text_type):
raise ProtocolError("invalid type {0} for 'authid' detail in HELLO".format(type(details_authid)))
authid = details_authid
obj = Hello(realm, roles, authmethods, authid)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
details = {u'roles': {}}
for role in self.roles:
details[u'roles'][role.ROLE] = {}
for feature in role.__dict__:
if ((not feature.startswith('_')) and (feature != 'ROLE') and (getattr(role, feature) is not None)):
if (not (u'features' in details[u'roles'][role.ROLE])):
details[u'roles'][role.ROLE] = {u'features': {}}
details[u'roles'][role.ROLE][u'features'][six.u(feature)] = getattr(role, feature)
if self.authmethods:
details[u'authmethods'] = self.authmethods
if self.authid:
details[u'authid'] = self.authid
return [Hello.MESSAGE_TYPE, self.realm, details]
| 2,416,302,809,581,985,300
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
details = {u'roles': {}}
for role in self.roles:
details[u'roles'][role.ROLE] = {}
for feature in role.__dict__:
if ((not feature.startswith('_')) and (feature != 'ROLE') and (getattr(role, feature) is not None)):
if (not (u'features' in details[u'roles'][role.ROLE])):
details[u'roles'][role.ROLE] = {u'features': {}}
details[u'roles'][role.ROLE][u'features'][six.u(feature)] = getattr(role, feature)
if self.authmethods:
details[u'authmethods'] = self.authmethods
if self.authid:
details[u'authid'] = self.authid
return [Hello.MESSAGE_TYPE, self.realm, details]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP HELLO Message (realm = {0}, roles = {1}, authmethods = {2}, authid = {3})'.format(self.realm, self.roles, self.authmethods, self.authid)
| 5,425,367,689,014,413,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP HELLO Message (realm = {0}, roles = {1}, authmethods = {2}, authid = {3})'.format(self.realm, self.roles, self.authmethods, self.authid)
|
def __init__(self, session, roles, authid=None, authrole=None, authmethod=None, authprovider=None):
'\n\n :param session: The WAMP session ID the other peer is assigned.\n :type session: int\n :param roles: The WAMP roles to announce.\n :type roles: list of :class:`autobahn.wamp.role.RoleFeatures`\n :param authid: The authentication ID assigned.\n :type authid: unicode or None\n :param authrole: The authentication role assigned.\n :type authrole: unicode or None\n :param authmethod: The authentication method in use.\n :type authmethod: unicode or None\n :param authprovider: The authentication method in use.\n :type authprovider: unicode or None\n '
assert (type(session) in six.integer_types)
assert (type(roles) == list)
for role in roles:
assert isinstance(role, autobahn.wamp.role.RoleFeatures)
assert ((authid is None) or (type(authid) == six.text_type))
assert ((authrole is None) or (type(authrole) == six.text_type))
assert ((authmethod is None) or (type(authmethod) == six.text_type))
assert ((authprovider is None) or (type(authprovider) == six.text_type))
Message.__init__(self)
self.session = session
self.roles = roles
self.authid = authid
self.authrole = authrole
self.authmethod = authmethod
self.authprovider = authprovider
| 6,721,403,217,499,834,000
|
:param session: The WAMP session ID the other peer is assigned.
:type session: int
:param roles: The WAMP roles to announce.
:type roles: list of :class:`autobahn.wamp.role.RoleFeatures`
:param authid: The authentication ID assigned.
:type authid: unicode or None
:param authrole: The authentication role assigned.
:type authrole: unicode or None
:param authmethod: The authentication method in use.
:type authmethod: unicode or None
:param authprovider: The authentication method in use.
:type authprovider: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, session, roles, authid=None, authrole=None, authmethod=None, authprovider=None):
'\n\n :param session: The WAMP session ID the other peer is assigned.\n :type session: int\n :param roles: The WAMP roles to announce.\n :type roles: list of :class:`autobahn.wamp.role.RoleFeatures`\n :param authid: The authentication ID assigned.\n :type authid: unicode or None\n :param authrole: The authentication role assigned.\n :type authrole: unicode or None\n :param authmethod: The authentication method in use.\n :type authmethod: unicode or None\n :param authprovider: The authentication method in use.\n :type authprovider: unicode or None\n '
assert (type(session) in six.integer_types)
assert (type(roles) == list)
for role in roles:
assert isinstance(role, autobahn.wamp.role.RoleFeatures)
assert ((authid is None) or (type(authid) == six.text_type))
assert ((authrole is None) or (type(authrole) == six.text_type))
assert ((authmethod is None) or (type(authmethod) == six.text_type))
assert ((authprovider is None) or (type(authprovider) == six.text_type))
Message.__init__(self)
self.session = session
self.roles = roles
self.authid = authid
self.authrole = authrole
self.authmethod = authmethod
self.authprovider = authprovider
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Welcome.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for WELCOME'.format(len(wmsg)))
session = check_or_raise_id(wmsg[1], "'session' in WELCOME")
details = check_or_raise_extra(wmsg[2], "'details' in WELCOME")
authid = details.get(u'authid', None)
authrole = details.get(u'authrole', None)
authmethod = details.get(u'authmethod', None)
authprovider = details.get(u'authprovider', None)
roles = []
if (not (u'roles' in details)):
raise ProtocolError('missing mandatory roles attribute in options in WELCOME')
details_roles = check_or_raise_extra(details['roles'], "'roles' in 'details' in WELCOME")
if (len(details_roles) == 0):
raise ProtocolError("empty 'roles' in 'details' in WELCOME")
for role in details_roles:
if (role not in ROLE_NAME_TO_CLASS):
raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in WELCOME".format(role))
role_cls = ROLE_NAME_TO_CLASS[role]
if (u'features' in details_roles[role]):
check_or_raise_extra(details_roles[role][u'features'], "'features' in role '{0}' in 'roles' in 'details' in WELCOME".format(role))
role_features = role_cls(**details_roles[role][u'features'])
else:
role_features = role_cls()
roles.append(role_features)
obj = Welcome(session, roles, authid, authrole, authmethod, authprovider)
return obj
| -809,151,263,493,066,600
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Welcome.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for WELCOME'.format(len(wmsg)))
session = check_or_raise_id(wmsg[1], "'session' in WELCOME")
details = check_or_raise_extra(wmsg[2], "'details' in WELCOME")
authid = details.get(u'authid', None)
authrole = details.get(u'authrole', None)
authmethod = details.get(u'authmethod', None)
authprovider = details.get(u'authprovider', None)
roles = []
if (not (u'roles' in details)):
raise ProtocolError('missing mandatory roles attribute in options in WELCOME')
details_roles = check_or_raise_extra(details['roles'], "'roles' in 'details' in WELCOME")
if (len(details_roles) == 0):
raise ProtocolError("empty 'roles' in 'details' in WELCOME")
for role in details_roles:
if (role not in ROLE_NAME_TO_CLASS):
raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in WELCOME".format(role))
role_cls = ROLE_NAME_TO_CLASS[role]
if (u'features' in details_roles[role]):
check_or_raise_extra(details_roles[role][u'features'], "'features' in role '{0}' in 'roles' in 'details' in WELCOME".format(role))
role_features = role_cls(**details_roles[role][u'features'])
else:
role_features = role_cls()
roles.append(role_features)
obj = Welcome(session, roles, authid, authrole, authmethod, authprovider)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
details = {u'roles': {}}
if self.authid:
details[u'authid'] = self.authid
if self.authrole:
details[u'authrole'] = self.authrole
if self.authrole:
details[u'authmethod'] = self.authmethod
if self.authprovider:
details[u'authprovider'] = self.authprovider
for role in self.roles:
details[u'roles'][role.ROLE] = {}
for feature in role.__dict__:
if ((not feature.startswith('_')) and (feature != 'ROLE') and (getattr(role, feature) is not None)):
if (not (u'features' in details[u'roles'][role.ROLE])):
details[u'roles'][role.ROLE] = {u'features': {}}
details[u'roles'][role.ROLE][u'features'][six.u(feature)] = getattr(role, feature)
return [Welcome.MESSAGE_TYPE, self.session, details]
| 1,819,675,321,183,616,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
details = {u'roles': {}}
if self.authid:
details[u'authid'] = self.authid
if self.authrole:
details[u'authrole'] = self.authrole
if self.authrole:
details[u'authmethod'] = self.authmethod
if self.authprovider:
details[u'authprovider'] = self.authprovider
for role in self.roles:
details[u'roles'][role.ROLE] = {}
for feature in role.__dict__:
if ((not feature.startswith('_')) and (feature != 'ROLE') and (getattr(role, feature) is not None)):
if (not (u'features' in details[u'roles'][role.ROLE])):
details[u'roles'][role.ROLE] = {u'features': {}}
details[u'roles'][role.ROLE][u'features'][six.u(feature)] = getattr(role, feature)
return [Welcome.MESSAGE_TYPE, self.session, details]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP WELCOME Message (session = {0}, roles = {1}, authid = {2}, authrole = {3}, authmethod = {4}, authprovider = {5})'.format(self.session, self.roles, self.authid, self.authrole, self.authmethod, self.authprovider)
| 5,280,581,898,306,727,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP WELCOME Message (session = {0}, roles = {1}, authid = {2}, authrole = {3}, authmethod = {4}, authprovider = {5})'.format(self.session, self.roles, self.authid, self.authrole, self.authmethod, self.authprovider)
|
def __init__(self, reason, message=None):
'\n\n :param reason: WAMP or application error URI for aborting reason.\n :type reason: unicode\n :param message: Optional human-readable closing message, e.g. for logging purposes.\n :type message: unicode or None\n '
assert (type(reason) == six.text_type)
assert ((message is None) or (type(message) == six.text_type))
Message.__init__(self)
self.reason = reason
self.message = message
| -7,064,131,980,725,198,000
|
:param reason: WAMP or application error URI for aborting reason.
:type reason: unicode
:param message: Optional human-readable closing message, e.g. for logging purposes.
:type message: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, reason, message=None):
'\n\n :param reason: WAMP or application error URI for aborting reason.\n :type reason: unicode\n :param message: Optional human-readable closing message, e.g. for logging purposes.\n :type message: unicode or None\n '
assert (type(reason) == six.text_type)
assert ((message is None) or (type(message) == six.text_type))
Message.__init__(self)
self.reason = reason
self.message = message
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Abort.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for ABORT'.format(len(wmsg)))
details = check_or_raise_extra(wmsg[1], "'details' in ABORT")
reason = check_or_raise_uri(wmsg[2], "'reason' in ABORT")
message = None
if (u'message' in details):
details_message = details[u'message']
if (type(details_message) != six.text_type):
raise ProtocolError("invalid type {0} for 'message' detail in ABORT".format(type(details_message)))
message = details_message
obj = Abort(reason, message)
return obj
| 1,401,950,129,522,157,600
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Abort.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for ABORT'.format(len(wmsg)))
details = check_or_raise_extra(wmsg[1], "'details' in ABORT")
reason = check_or_raise_uri(wmsg[2], "'reason' in ABORT")
message = None
if (u'message' in details):
details_message = details[u'message']
if (type(details_message) != six.text_type):
raise ProtocolError("invalid type {0} for 'message' detail in ABORT".format(type(details_message)))
message = details_message
obj = Abort(reason, message)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
details = {}
if self.message:
details[u'message'] = self.message
return [Abort.MESSAGE_TYPE, details, self.reason]
| -3,461,163,658,099,199,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
details = {}
if self.message:
details[u'message'] = self.message
return [Abort.MESSAGE_TYPE, details, self.reason]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP ABORT Message (message = {0}, reason = {1})'.format(self.message, self.reason)
| -8,310,902,822,718,359,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP ABORT Message (message = {0}, reason = {1})'.format(self.message, self.reason)
|
def __init__(self, method, extra=None):
'\n\n :param method: The authentication method.\n :type method: unicode\n :param extra: Authentication method specific information.\n :type extra: dict or None\n '
assert (type(method) == six.text_type)
assert ((extra is None) or (type(extra) == dict))
Message.__init__(self)
self.method = method
self.extra = (extra or {})
| 1,401,284,462,769,390,600
|
:param method: The authentication method.
:type method: unicode
:param extra: Authentication method specific information.
:type extra: dict or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, method, extra=None):
'\n\n :param method: The authentication method.\n :type method: unicode\n :param extra: Authentication method specific information.\n :type extra: dict or None\n '
assert (type(method) == six.text_type)
assert ((extra is None) or (type(extra) == dict))
Message.__init__(self)
self.method = method
self.extra = (extra or {})
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Challenge.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for CHALLENGE'.format(len(wmsg)))
method = wmsg[1]
if (type(method) != six.text_type):
raise ProtocolError("invalid type {0} for 'method' in CHALLENGE".format(type(method)))
extra = check_or_raise_extra(wmsg[2], "'extra' in CHALLENGE")
obj = Challenge(method, extra)
return obj
| -2,230,605,559,852,671,700
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Challenge.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for CHALLENGE'.format(len(wmsg)))
method = wmsg[1]
if (type(method) != six.text_type):
raise ProtocolError("invalid type {0} for 'method' in CHALLENGE".format(type(method)))
extra = check_or_raise_extra(wmsg[2], "'extra' in CHALLENGE")
obj = Challenge(method, extra)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Challenge.MESSAGE_TYPE, self.method, self.extra]
| -9,182,350,914,335,521,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Challenge.MESSAGE_TYPE, self.method, self.extra]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP CHALLENGE Message (method = {0}, extra = {1})'.format(self.method, self.extra)
| -7,710,646,853,727,320,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP CHALLENGE Message (method = {0}, extra = {1})'.format(self.method, self.extra)
|
def __init__(self, signature, extra=None):
'\n\n :param signature: The signature for the authentication challenge.\n :type signature: unicode\n :param extra: Authentication method specific information.\n :type extra: dict or None\n '
assert (type(signature) == six.text_type)
assert ((extra is None) or (type(extra) == dict))
Message.__init__(self)
self.signature = signature
self.extra = (extra or {})
| 2,623,983,776,764,532,700
|
:param signature: The signature for the authentication challenge.
:type signature: unicode
:param extra: Authentication method specific information.
:type extra: dict or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, signature, extra=None):
'\n\n :param signature: The signature for the authentication challenge.\n :type signature: unicode\n :param extra: Authentication method specific information.\n :type extra: dict or None\n '
assert (type(signature) == six.text_type)
assert ((extra is None) or (type(extra) == dict))
Message.__init__(self)
self.signature = signature
self.extra = (extra or {})
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Authenticate.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for AUTHENTICATE'.format(len(wmsg)))
signature = wmsg[1]
if (type(signature) != six.text_type):
raise ProtocolError("invalid type {0} for 'signature' in AUTHENTICATE".format(type(signature)))
extra = check_or_raise_extra(wmsg[2], "'extra' in AUTHENTICATE")
obj = Authenticate(signature, extra)
return obj
| 6,139,271,799,813,657,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Authenticate.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for AUTHENTICATE'.format(len(wmsg)))
signature = wmsg[1]
if (type(signature) != six.text_type):
raise ProtocolError("invalid type {0} for 'signature' in AUTHENTICATE".format(type(signature)))
extra = check_or_raise_extra(wmsg[2], "'extra' in AUTHENTICATE")
obj = Authenticate(signature, extra)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Authenticate.MESSAGE_TYPE, self.signature, self.extra]
| -6,435,238,085,168,985,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Authenticate.MESSAGE_TYPE, self.signature, self.extra]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP AUTHENTICATE Message (signature = {0}, extra = {1})'.format(self.signature, self.extra)
| 8,850,050,369,419,939,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP AUTHENTICATE Message (signature = {0}, extra = {1})'.format(self.signature, self.extra)
|
def __init__(self, reason=DEFAULT_REASON, message=None):
'\n\n :param reason: Optional WAMP or application error URI for closing reason.\n :type reason: unicode\n :param message: Optional human-readable closing message, e.g. for logging purposes.\n :type message: unicode or None\n '
assert (type(reason) == six.text_type)
assert ((message is None) or (type(message) == six.text_type))
Message.__init__(self)
self.reason = reason
self.message = message
| -8,878,451,259,387,417,000
|
:param reason: Optional WAMP or application error URI for closing reason.
:type reason: unicode
:param message: Optional human-readable closing message, e.g. for logging purposes.
:type message: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, reason=DEFAULT_REASON, message=None):
'\n\n :param reason: Optional WAMP or application error URI for closing reason.\n :type reason: unicode\n :param message: Optional human-readable closing message, e.g. for logging purposes.\n :type message: unicode or None\n '
assert (type(reason) == six.text_type)
assert ((message is None) or (type(message) == six.text_type))
Message.__init__(self)
self.reason = reason
self.message = message
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Goodbye.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for GOODBYE'.format(len(wmsg)))
details = check_or_raise_extra(wmsg[1], "'details' in GOODBYE")
reason = check_or_raise_uri(wmsg[2], "'reason' in GOODBYE")
message = None
if (u'message' in details):
details_message = details[u'message']
if (type(details_message) != six.text_type):
raise ProtocolError("invalid type {0} for 'message' detail in GOODBYE".format(type(details_message)))
message = details_message
obj = Goodbye(reason, message)
return obj
| 3,091,404,400,130,898,400
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Goodbye.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for GOODBYE'.format(len(wmsg)))
details = check_or_raise_extra(wmsg[1], "'details' in GOODBYE")
reason = check_or_raise_uri(wmsg[2], "'reason' in GOODBYE")
message = None
if (u'message' in details):
details_message = details[u'message']
if (type(details_message) != six.text_type):
raise ProtocolError("invalid type {0} for 'message' detail in GOODBYE".format(type(details_message)))
message = details_message
obj = Goodbye(reason, message)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
details = {}
if self.message:
details[u'message'] = self.message
return [Goodbye.MESSAGE_TYPE, details, self.reason]
| 6,978,399,930,994,674,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
details = {}
if self.message:
details[u'message'] = self.message
return [Goodbye.MESSAGE_TYPE, details, self.reason]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP GOODBYE Message (message = {0}, reason = {1})'.format(self.message, self.reason)
| 5,403,774,823,011,029,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP GOODBYE Message (message = {0}, reason = {1})'.format(self.message, self.reason)
|
def __init__(self, incoming, outgoing, discard=None):
'\n\n :param incoming: Last incoming heartbeat processed from peer.\n :type incoming: int\n :param outgoing: Outgoing heartbeat.\n :type outgoing: int\n :param discard: Optional data that is discarded by peer.\n :type discard: unicode or None\n '
assert (type(incoming) in six.integer_types)
assert (type(outgoing) in six.integer_types)
assert ((discard is None) or (type(discard) == six.text_type))
Message.__init__(self)
self.incoming = incoming
self.outgoing = outgoing
self.discard = discard
| -5,126,619,765,292,551,000
|
:param incoming: Last incoming heartbeat processed from peer.
:type incoming: int
:param outgoing: Outgoing heartbeat.
:type outgoing: int
:param discard: Optional data that is discarded by peer.
:type discard: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, incoming, outgoing, discard=None):
'\n\n :param incoming: Last incoming heartbeat processed from peer.\n :type incoming: int\n :param outgoing: Outgoing heartbeat.\n :type outgoing: int\n :param discard: Optional data that is discarded by peer.\n :type discard: unicode or None\n '
assert (type(incoming) in six.integer_types)
assert (type(outgoing) in six.integer_types)
assert ((discard is None) or (type(discard) == six.text_type))
Message.__init__(self)
self.incoming = incoming
self.outgoing = outgoing
self.discard = discard
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Heartbeat.MESSAGE_TYPE))
if (len(wmsg) not in [3, 4]):
raise ProtocolError('invalid message length {0} for HEARTBEAT'.format(len(wmsg)))
incoming = wmsg[1]
if (type(incoming) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'incoming' in HEARTBEAT".format(type(incoming)))
if (incoming < 0):
raise ProtocolError("invalid value {0} for 'incoming' in HEARTBEAT".format(incoming))
outgoing = wmsg[2]
if (type(outgoing) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'outgoing' in HEARTBEAT".format(type(outgoing)))
if (outgoing <= 0):
raise ProtocolError("invalid value {0} for 'outgoing' in HEARTBEAT".format(outgoing))
discard = None
if (len(wmsg) > 3):
discard = wmsg[3]
if (type(discard) != six.text_type):
raise ProtocolError("invalid type {0} for 'discard' in HEARTBEAT".format(type(discard)))
obj = Heartbeat(incoming, outgoing, discard=discard)
return obj
| -4,618,181,281,293,706,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Heartbeat.MESSAGE_TYPE))
if (len(wmsg) not in [3, 4]):
raise ProtocolError('invalid message length {0} for HEARTBEAT'.format(len(wmsg)))
incoming = wmsg[1]
if (type(incoming) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'incoming' in HEARTBEAT".format(type(incoming)))
if (incoming < 0):
raise ProtocolError("invalid value {0} for 'incoming' in HEARTBEAT".format(incoming))
outgoing = wmsg[2]
if (type(outgoing) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'outgoing' in HEARTBEAT".format(type(outgoing)))
if (outgoing <= 0):
raise ProtocolError("invalid value {0} for 'outgoing' in HEARTBEAT".format(outgoing))
discard = None
if (len(wmsg) > 3):
discard = wmsg[3]
if (type(discard) != six.text_type):
raise ProtocolError("invalid type {0} for 'discard' in HEARTBEAT".format(type(discard)))
obj = Heartbeat(incoming, outgoing, discard=discard)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
if self.discard:
return [Heartbeat.MESSAGE_TYPE, self.incoming, self.outgoing, self.discard]
else:
return [Heartbeat.MESSAGE_TYPE, self.incoming, self.outgoing]
| -9,053,941,445,088,547,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
if self.discard:
return [Heartbeat.MESSAGE_TYPE, self.incoming, self.outgoing, self.discard]
else:
return [Heartbeat.MESSAGE_TYPE, self.incoming, self.outgoing]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP HEARTBEAT Message (incoming {0}, outgoing = {1}, len(discard) = {2})'.format(self.incoming, self.outgoing, (len(self.discard) if self.discard else None))
| -7,035,302,393,283,577,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP HEARTBEAT Message (incoming {0}, outgoing = {1}, len(discard) = {2})'.format(self.incoming, self.outgoing, (len(self.discard) if self.discard else None))
|
def __init__(self, request_type, request, error, args=None, kwargs=None):
'\n\n :param request_type: The WAMP message type code for the original request.\n :type request_type: int\n :param request: The WAMP request ID of the original request (`Call`, `Subscribe`, ...) this error occurred for.\n :type request: int\n :param error: The WAMP or application error URI for the error that occurred.\n :type error: unicode\n :param args: Positional values for application-defined exception.\n Must be serializable using any serializers in use.\n :type args: list or None\n :param kwargs: Keyword values for application-defined exception.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n '
assert (type(request_type) in six.integer_types)
assert (type(request) in six.integer_types)
assert (type(error) == six.text_type)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
Message.__init__(self)
self.request_type = request_type
self.request = request
self.error = error
self.args = args
self.kwargs = kwargs
| 656,571,257,217,374,000
|
:param request_type: The WAMP message type code for the original request.
:type request_type: int
:param request: The WAMP request ID of the original request (`Call`, `Subscribe`, ...) this error occurred for.
:type request: int
:param error: The WAMP or application error URI for the error that occurred.
:type error: unicode
:param args: Positional values for application-defined exception.
Must be serializable using any serializers in use.
:type args: list or None
:param kwargs: Keyword values for application-defined exception.
Must be serializable using any serializers in use.
:type kwargs: dict or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request_type, request, error, args=None, kwargs=None):
'\n\n :param request_type: The WAMP message type code for the original request.\n :type request_type: int\n :param request: The WAMP request ID of the original request (`Call`, `Subscribe`, ...) this error occurred for.\n :type request: int\n :param error: The WAMP or application error URI for the error that occurred.\n :type error: unicode\n :param args: Positional values for application-defined exception.\n Must be serializable using any serializers in use.\n :type args: list or None\n :param kwargs: Keyword values for application-defined exception.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n '
assert (type(request_type) in six.integer_types)
assert (type(request) in six.integer_types)
assert (type(error) == six.text_type)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
Message.__init__(self)
self.request_type = request_type
self.request = request
self.error = error
self.args = args
self.kwargs = kwargs
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Error.MESSAGE_TYPE))
if (len(wmsg) not in (5, 6, 7)):
raise ProtocolError('invalid message length {0} for ERROR'.format(len(wmsg)))
request_type = wmsg[1]
if (type(request_type) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'request_type' in ERROR".format(request_type))
if (request_type not in [Subscribe.MESSAGE_TYPE, Unsubscribe.MESSAGE_TYPE, Publish.MESSAGE_TYPE, Register.MESSAGE_TYPE, Unregister.MESSAGE_TYPE, Call.MESSAGE_TYPE, Invocation.MESSAGE_TYPE]):
raise ProtocolError("invalid value {0} for 'request_type' in ERROR".format(request_type))
request = check_or_raise_id(wmsg[2], "'request' in ERROR")
_ = check_or_raise_extra(wmsg[3], "'details' in ERROR")
error = check_or_raise_uri(wmsg[4], "'error' in ERROR")
args = None
if (len(wmsg) > 5):
args = wmsg[5]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in ERROR".format(type(args)))
kwargs = None
if (len(wmsg) > 6):
kwargs = wmsg[6]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in ERROR".format(type(kwargs)))
obj = Error(request_type, request, error, args=args, kwargs=kwargs)
return obj
| 1,801,569,104,668,441,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Error.MESSAGE_TYPE))
if (len(wmsg) not in (5, 6, 7)):
raise ProtocolError('invalid message length {0} for ERROR'.format(len(wmsg)))
request_type = wmsg[1]
if (type(request_type) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'request_type' in ERROR".format(request_type))
if (request_type not in [Subscribe.MESSAGE_TYPE, Unsubscribe.MESSAGE_TYPE, Publish.MESSAGE_TYPE, Register.MESSAGE_TYPE, Unregister.MESSAGE_TYPE, Call.MESSAGE_TYPE, Invocation.MESSAGE_TYPE]):
raise ProtocolError("invalid value {0} for 'request_type' in ERROR".format(request_type))
request = check_or_raise_id(wmsg[2], "'request' in ERROR")
_ = check_or_raise_extra(wmsg[3], "'details' in ERROR")
error = check_or_raise_uri(wmsg[4], "'error' in ERROR")
args = None
if (len(wmsg) > 5):
args = wmsg[5]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in ERROR".format(type(args)))
kwargs = None
if (len(wmsg) > 6):
kwargs = wmsg[6]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in ERROR".format(type(kwargs)))
obj = Error(request_type, request, error, args=args, kwargs=kwargs)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
details = {}
if self.kwargs:
return [self.MESSAGE_TYPE, self.request_type, self.request, details, self.error, self.args, self.kwargs]
elif self.args:
return [self.MESSAGE_TYPE, self.request_type, self.request, details, self.error, self.args]
else:
return [self.MESSAGE_TYPE, self.request_type, self.request, details, self.error]
| 7,687,785,052,454,092,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
details = {}
if self.kwargs:
return [self.MESSAGE_TYPE, self.request_type, self.request, details, self.error, self.args, self.kwargs]
elif self.args:
return [self.MESSAGE_TYPE, self.request_type, self.request, details, self.error, self.args]
else:
return [self.MESSAGE_TYPE, self.request_type, self.request, details, self.error]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP Error Message (request_type = {0}, request = {1}, error = {2}, args = {3}, kwargs = {4})'.format(self.request_type, self.request, self.error, self.args, self.kwargs)
| 695,279,372,613,099,400
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP Error Message (request_type = {0}, request = {1}, error = {2}, args = {3}, kwargs = {4})'.format(self.request_type, self.request, self.error, self.args, self.kwargs)
|
def __init__(self, request, topic, args=None, kwargs=None, acknowledge=None, excludeMe=None, exclude=None, eligible=None, discloseMe=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param topic: The WAMP or application URI of the PubSub topic the event should\n be published to.\n :type topic: unicode\n :param args: Positional values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param acknowledge: If True, acknowledge the publication with a success or\n error response.\n :type acknowledge: bool or None\n :param excludeMe: If ``True``, exclude the publisher from receiving the event, even\n if he is subscribed (and eligible).\n :type excludeMe: bool or None\n :param exclude: List of WAMP session IDs to exclude from receiving this event.\n :type exclude: list of int or None\n :param eligible: List of WAMP session IDs eligible to receive this event.\n :type eligible: list of int or None\n :param discloseMe: If True, request to disclose the publisher of this event\n to subscribers.\n :type discloseMe: bool or None\n '
assert (type(request) in six.integer_types)
assert (type(topic) == six.text_type)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((acknowledge is None) or (type(acknowledge) == bool))
assert ((excludeMe is None) or (type(excludeMe) == bool))
assert ((exclude is None) or (type(exclude) == list))
assert ((eligible is None) or (type(eligible) == list))
assert ((discloseMe is None) or (type(discloseMe) == bool))
Message.__init__(self)
self.request = request
self.topic = topic
self.args = args
self.kwargs = kwargs
self.acknowledge = acknowledge
self.excludeMe = excludeMe
self.exclude = exclude
self.eligible = eligible
self.discloseMe = discloseMe
| -4,565,690,850,102,938,000
|
:param request: The WAMP request ID of this request.
:type request: int
:param topic: The WAMP or application URI of the PubSub topic the event should
be published to.
:type topic: unicode
:param args: Positional values for application-defined event payload.
Must be serializable using any serializers in use.
:type args: list or tuple or None
:param kwargs: Keyword values for application-defined event payload.
Must be serializable using any serializers in use.
:type kwargs: dict or None
:param acknowledge: If True, acknowledge the publication with a success or
error response.
:type acknowledge: bool or None
:param excludeMe: If ``True``, exclude the publisher from receiving the event, even
if he is subscribed (and eligible).
:type excludeMe: bool or None
:param exclude: List of WAMP session IDs to exclude from receiving this event.
:type exclude: list of int or None
:param eligible: List of WAMP session IDs eligible to receive this event.
:type eligible: list of int or None
:param discloseMe: If True, request to disclose the publisher of this event
to subscribers.
:type discloseMe: bool or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, topic, args=None, kwargs=None, acknowledge=None, excludeMe=None, exclude=None, eligible=None, discloseMe=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param topic: The WAMP or application URI of the PubSub topic the event should\n be published to.\n :type topic: unicode\n :param args: Positional values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param acknowledge: If True, acknowledge the publication with a success or\n error response.\n :type acknowledge: bool or None\n :param excludeMe: If ``True``, exclude the publisher from receiving the event, even\n if he is subscribed (and eligible).\n :type excludeMe: bool or None\n :param exclude: List of WAMP session IDs to exclude from receiving this event.\n :type exclude: list of int or None\n :param eligible: List of WAMP session IDs eligible to receive this event.\n :type eligible: list of int or None\n :param discloseMe: If True, request to disclose the publisher of this event\n to subscribers.\n :type discloseMe: bool or None\n '
assert (type(request) in six.integer_types)
assert (type(topic) == six.text_type)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((acknowledge is None) or (type(acknowledge) == bool))
assert ((excludeMe is None) or (type(excludeMe) == bool))
assert ((exclude is None) or (type(exclude) == list))
assert ((eligible is None) or (type(eligible) == list))
assert ((discloseMe is None) or (type(discloseMe) == bool))
Message.__init__(self)
self.request = request
self.topic = topic
self.args = args
self.kwargs = kwargs
self.acknowledge = acknowledge
self.excludeMe = excludeMe
self.exclude = exclude
self.eligible = eligible
self.discloseMe = discloseMe
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Publish.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for PUBLISH'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in PUBLISH")
options = check_or_raise_extra(wmsg[2], "'options' in PUBLISH")
topic = check_or_raise_uri(wmsg[3], "'topic' in PUBLISH")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in PUBLISH".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in PUBLISH".format(type(kwargs)))
acknowledge = None
excludeMe = None
exclude = None
eligible = None
discloseMe = None
if (u'acknowledge' in options):
option_acknowledge = options[u'acknowledge']
if (type(option_acknowledge) != bool):
raise ProtocolError("invalid type {0} for 'acknowledge' option in PUBLISH".format(type(option_acknowledge)))
acknowledge = option_acknowledge
if (u'exclude_me' in options):
option_excludeMe = options[u'exclude_me']
if (type(option_excludeMe) != bool):
raise ProtocolError("invalid type {0} for 'exclude_me' option in PUBLISH".format(type(option_excludeMe)))
excludeMe = option_excludeMe
if (u'exclude' in options):
option_exclude = options[u'exclude']
if (type(option_exclude) != list):
raise ProtocolError("invalid type {0} for 'exclude' option in PUBLISH".format(type(option_exclude)))
for sessionId in option_exclude:
if (type(sessionId) not in six.integer_types):
raise ProtocolError("invalid type {0} for value in 'exclude' option in PUBLISH".format(type(sessionId)))
exclude = option_exclude
if (u'eligible' in options):
option_eligible = options[u'eligible']
if (type(option_eligible) != list):
raise ProtocolError("invalid type {0} for 'eligible' option in PUBLISH".format(type(option_eligible)))
for sessionId in option_eligible:
if (type(sessionId) not in six.integer_types):
raise ProtocolError("invalid type {0} for value in 'eligible' option in PUBLISH".format(type(sessionId)))
eligible = option_eligible
if (u'disclose_me' in options):
option_discloseMe = options[u'disclose_me']
if (type(option_discloseMe) != bool):
raise ProtocolError("invalid type {0} for 'disclose_me' option in PUBLISH".format(type(option_discloseMe)))
discloseMe = option_discloseMe
obj = Publish(request, topic, args=args, kwargs=kwargs, acknowledge=acknowledge, excludeMe=excludeMe, exclude=exclude, eligible=eligible, discloseMe=discloseMe)
return obj
| 3,019,815,833,378,934,300
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Publish.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for PUBLISH'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in PUBLISH")
options = check_or_raise_extra(wmsg[2], "'options' in PUBLISH")
topic = check_or_raise_uri(wmsg[3], "'topic' in PUBLISH")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in PUBLISH".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in PUBLISH".format(type(kwargs)))
acknowledge = None
excludeMe = None
exclude = None
eligible = None
discloseMe = None
if (u'acknowledge' in options):
option_acknowledge = options[u'acknowledge']
if (type(option_acknowledge) != bool):
raise ProtocolError("invalid type {0} for 'acknowledge' option in PUBLISH".format(type(option_acknowledge)))
acknowledge = option_acknowledge
if (u'exclude_me' in options):
option_excludeMe = options[u'exclude_me']
if (type(option_excludeMe) != bool):
raise ProtocolError("invalid type {0} for 'exclude_me' option in PUBLISH".format(type(option_excludeMe)))
excludeMe = option_excludeMe
if (u'exclude' in options):
option_exclude = options[u'exclude']
if (type(option_exclude) != list):
raise ProtocolError("invalid type {0} for 'exclude' option in PUBLISH".format(type(option_exclude)))
for sessionId in option_exclude:
if (type(sessionId) not in six.integer_types):
raise ProtocolError("invalid type {0} for value in 'exclude' option in PUBLISH".format(type(sessionId)))
exclude = option_exclude
if (u'eligible' in options):
option_eligible = options[u'eligible']
if (type(option_eligible) != list):
raise ProtocolError("invalid type {0} for 'eligible' option in PUBLISH".format(type(option_eligible)))
for sessionId in option_eligible:
if (type(sessionId) not in six.integer_types):
raise ProtocolError("invalid type {0} for value in 'eligible' option in PUBLISH".format(type(sessionId)))
eligible = option_eligible
if (u'disclose_me' in options):
option_discloseMe = options[u'disclose_me']
if (type(option_discloseMe) != bool):
raise ProtocolError("invalid type {0} for 'disclose_me' option in PUBLISH".format(type(option_discloseMe)))
discloseMe = option_discloseMe
obj = Publish(request, topic, args=args, kwargs=kwargs, acknowledge=acknowledge, excludeMe=excludeMe, exclude=exclude, eligible=eligible, discloseMe=discloseMe)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
options = {}
if (self.acknowledge is not None):
options[u'acknowledge'] = self.acknowledge
if (self.excludeMe is not None):
options[u'exclude_me'] = self.excludeMe
if (self.exclude is not None):
options[u'exclude'] = self.exclude
if (self.eligible is not None):
options[u'eligible'] = self.eligible
if (self.discloseMe is not None):
options[u'disclose_me'] = self.discloseMe
if self.kwargs:
return [Publish.MESSAGE_TYPE, self.request, options, self.topic, self.args, self.kwargs]
elif self.args:
return [Publish.MESSAGE_TYPE, self.request, options, self.topic, self.args]
else:
return [Publish.MESSAGE_TYPE, self.request, options, self.topic]
| 1,144,373,679,118,756,900
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
options = {}
if (self.acknowledge is not None):
options[u'acknowledge'] = self.acknowledge
if (self.excludeMe is not None):
options[u'exclude_me'] = self.excludeMe
if (self.exclude is not None):
options[u'exclude'] = self.exclude
if (self.eligible is not None):
options[u'eligible'] = self.eligible
if (self.discloseMe is not None):
options[u'disclose_me'] = self.discloseMe
if self.kwargs:
return [Publish.MESSAGE_TYPE, self.request, options, self.topic, self.args, self.kwargs]
elif self.args:
return [Publish.MESSAGE_TYPE, self.request, options, self.topic, self.args]
else:
return [Publish.MESSAGE_TYPE, self.request, options, self.topic]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP PUBLISH Message (request = {0}, topic = {1}, args = {2}, kwargs = {3}, acknowledge = {4}, excludeMe = {5}, exclude = {6}, eligible = {7}, discloseMe = {8})'.format(self.request, self.topic, self.args, self.kwargs, self.acknowledge, self.excludeMe, self.exclude, self.eligible, self.discloseMe)
| 588,753,222,025,310,800
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP PUBLISH Message (request = {0}, topic = {1}, args = {2}, kwargs = {3}, acknowledge = {4}, excludeMe = {5}, exclude = {6}, eligible = {7}, discloseMe = {8})'.format(self.request, self.topic, self.args, self.kwargs, self.acknowledge, self.excludeMe, self.exclude, self.eligible, self.discloseMe)
|
def __init__(self, request, publication):
'\n\n :param request: The request ID of the original `PUBLISH` request.\n :type request: int\n :param publication: The publication ID for the published event.\n :type publication: int\n '
assert (type(request) in six.integer_types)
assert (type(publication) in six.integer_types)
Message.__init__(self)
self.request = request
self.publication = publication
| 4,295,771,757,650,596,400
|
:param request: The request ID of the original `PUBLISH` request.
:type request: int
:param publication: The publication ID for the published event.
:type publication: int
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, publication):
'\n\n :param request: The request ID of the original `PUBLISH` request.\n :type request: int\n :param publication: The publication ID for the published event.\n :type publication: int\n '
assert (type(request) in six.integer_types)
assert (type(publication) in six.integer_types)
Message.__init__(self)
self.request = request
self.publication = publication
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Published.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for PUBLISHED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in PUBLISHED")
publication = check_or_raise_id(wmsg[2], "'publication' in PUBLISHED")
obj = Published(request, publication)
return obj
| -3,884,889,786,763,085,300
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Published.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for PUBLISHED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in PUBLISHED")
publication = check_or_raise_id(wmsg[2], "'publication' in PUBLISHED")
obj = Published(request, publication)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Published.MESSAGE_TYPE, self.request, self.publication]
| 3,169,238,331,139,957,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Published.MESSAGE_TYPE, self.request, self.publication]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP PUBLISHED Message (request = {0}, publication = {1})'.format(self.request, self.publication)
| 7,539,543,141,621,043,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP PUBLISHED Message (request = {0}, publication = {1})'.format(self.request, self.publication)
|
def __init__(self, request, topic, match=MATCH_EXACT):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param topic: The WAMP or application URI of the PubSub topic to subscribe to.\n :type topic: unicode\n :param match: The topic matching method to be used for the subscription.\n :type match: unicode\n '
assert (type(request) in six.integer_types)
assert (type(topic) == six.text_type)
assert ((match is None) or (type(match) == six.text_type))
assert ((match is None) or (match in [self.MATCH_EXACT, self.MATCH_PREFIX, self.MATCH_WILDCARD]))
Message.__init__(self)
self.request = request
self.topic = topic
self.match = match
| -4,203,042,192,525,519,400
|
:param request: The WAMP request ID of this request.
:type request: int
:param topic: The WAMP or application URI of the PubSub topic to subscribe to.
:type topic: unicode
:param match: The topic matching method to be used for the subscription.
:type match: unicode
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, topic, match=MATCH_EXACT):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param topic: The WAMP or application URI of the PubSub topic to subscribe to.\n :type topic: unicode\n :param match: The topic matching method to be used for the subscription.\n :type match: unicode\n '
assert (type(request) in six.integer_types)
assert (type(topic) == six.text_type)
assert ((match is None) or (type(match) == six.text_type))
assert ((match is None) or (match in [self.MATCH_EXACT, self.MATCH_PREFIX, self.MATCH_WILDCARD]))
Message.__init__(self)
self.request = request
self.topic = topic
self.match = match
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Subscribe.MESSAGE_TYPE))
if (len(wmsg) != 4):
raise ProtocolError('invalid message length {0} for SUBSCRIBE'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in SUBSCRIBE")
options = check_or_raise_extra(wmsg[2], "'options' in SUBSCRIBE")
topic = check_or_raise_uri(wmsg[3], "'topic' in SUBSCRIBE")
match = Subscribe.MATCH_EXACT
if (u'match' in options):
option_match = options[u'match']
if (type(option_match) != six.text_type):
raise ProtocolError("invalid type {0} for 'match' option in SUBSCRIBE".format(type(option_match)))
if (option_match not in [Subscribe.MATCH_EXACT, Subscribe.MATCH_PREFIX, Subscribe.MATCH_WILDCARD]):
raise ProtocolError("invalid value {0} for 'match' option in SUBSCRIBE".format(option_match))
match = option_match
obj = Subscribe(request, topic, match)
return obj
| 3,873,781,794,385,556,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Subscribe.MESSAGE_TYPE))
if (len(wmsg) != 4):
raise ProtocolError('invalid message length {0} for SUBSCRIBE'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in SUBSCRIBE")
options = check_or_raise_extra(wmsg[2], "'options' in SUBSCRIBE")
topic = check_or_raise_uri(wmsg[3], "'topic' in SUBSCRIBE")
match = Subscribe.MATCH_EXACT
if (u'match' in options):
option_match = options[u'match']
if (type(option_match) != six.text_type):
raise ProtocolError("invalid type {0} for 'match' option in SUBSCRIBE".format(type(option_match)))
if (option_match not in [Subscribe.MATCH_EXACT, Subscribe.MATCH_PREFIX, Subscribe.MATCH_WILDCARD]):
raise ProtocolError("invalid value {0} for 'match' option in SUBSCRIBE".format(option_match))
match = option_match
obj = Subscribe(request, topic, match)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
options = {}
if (self.match and (self.match != Subscribe.MATCH_EXACT)):
options[u'match'] = self.match
return [Subscribe.MESSAGE_TYPE, self.request, options, self.topic]
| -1,644,114,748,712,464,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
options = {}
if (self.match and (self.match != Subscribe.MATCH_EXACT)):
options[u'match'] = self.match
return [Subscribe.MESSAGE_TYPE, self.request, options, self.topic]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP SUBSCRIBE Message (request = {0}, topic = {1}, match = {2})'.format(self.request, self.topic, self.match)
| -9,219,016,473,638,614,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP SUBSCRIBE Message (request = {0}, topic = {1}, match = {2})'.format(self.request, self.topic, self.match)
|
def __init__(self, request, subscription):
'\n\n :param request: The request ID of the original ``SUBSCRIBE`` request.\n :type request: int\n :param subscription: The subscription ID for the subscribed topic (or topic pattern).\n :type subscription: int\n '
assert (type(request) in six.integer_types)
assert (type(subscription) in six.integer_types)
Message.__init__(self)
self.request = request
self.subscription = subscription
| -1,199,081,093,057,370,600
|
:param request: The request ID of the original ``SUBSCRIBE`` request.
:type request: int
:param subscription: The subscription ID for the subscribed topic (or topic pattern).
:type subscription: int
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, subscription):
'\n\n :param request: The request ID of the original ``SUBSCRIBE`` request.\n :type request: int\n :param subscription: The subscription ID for the subscribed topic (or topic pattern).\n :type subscription: int\n '
assert (type(request) in six.integer_types)
assert (type(subscription) in six.integer_types)
Message.__init__(self)
self.request = request
self.subscription = subscription
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Subscribed.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for SUBSCRIBED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in SUBSCRIBED")
subscription = check_or_raise_id(wmsg[2], "'subscription' in SUBSCRIBED")
obj = Subscribed(request, subscription)
return obj
| 1,194,128,863,385,672,700
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Subscribed.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for SUBSCRIBED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in SUBSCRIBED")
subscription = check_or_raise_id(wmsg[2], "'subscription' in SUBSCRIBED")
obj = Subscribed(request, subscription)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Subscribed.MESSAGE_TYPE, self.request, self.subscription]
| 9,207,363,406,212,574,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Subscribed.MESSAGE_TYPE, self.request, self.subscription]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP SUBSCRIBED Message (request = {0}, subscription = {1})'.format(self.request, self.subscription)
| -4,267,679,350,267,498,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP SUBSCRIBED Message (request = {0}, subscription = {1})'.format(self.request, self.subscription)
|
def __init__(self, request, subscription):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param subscription: The subscription ID for the subscription to unsubscribe from.\n :type subscription: int\n '
assert (type(request) in six.integer_types)
assert (type(subscription) in six.integer_types)
Message.__init__(self)
self.request = request
self.subscription = subscription
| -4,122,627,609,804,850,700
|
:param request: The WAMP request ID of this request.
:type request: int
:param subscription: The subscription ID for the subscription to unsubscribe from.
:type subscription: int
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, subscription):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param subscription: The subscription ID for the subscription to unsubscribe from.\n :type subscription: int\n '
assert (type(request) in six.integer_types)
assert (type(subscription) in six.integer_types)
Message.__init__(self)
self.request = request
self.subscription = subscription
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unsubscribe.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for WAMP UNSUBSCRIBE'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNSUBSCRIBE")
subscription = check_or_raise_id(wmsg[2], "'subscription' in UNSUBSCRIBE")
obj = Unsubscribe(request, subscription)
return obj
| 6,852,207,913,547,047,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unsubscribe.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for WAMP UNSUBSCRIBE'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNSUBSCRIBE")
subscription = check_or_raise_id(wmsg[2], "'subscription' in UNSUBSCRIBE")
obj = Unsubscribe(request, subscription)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Unsubscribe.MESSAGE_TYPE, self.request, self.subscription]
| 2,689,994,447,234,143,700
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Unsubscribe.MESSAGE_TYPE, self.request, self.subscription]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP UNSUBSCRIBE Message (request = {0}, subscription = {1})'.format(self.request, self.subscription)
| 7,736,455,921,422,932,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP UNSUBSCRIBE Message (request = {0}, subscription = {1})'.format(self.request, self.subscription)
|
def __init__(self, request):
'\n\n :param request: The request ID of the original ``UNSUBSCRIBE`` request.\n :type request: int\n '
assert (type(request) in six.integer_types)
Message.__init__(self)
self.request = request
| 3,717,980,141,047,857,700
|
:param request: The request ID of the original ``UNSUBSCRIBE`` request.
:type request: int
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request):
'\n\n :param request: The request ID of the original ``UNSUBSCRIBE`` request.\n :type request: int\n '
assert (type(request) in six.integer_types)
Message.__init__(self)
self.request = request
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unsubscribed.MESSAGE_TYPE))
if (len(wmsg) != 2):
raise ProtocolError('invalid message length {0} for UNSUBSCRIBED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNSUBSCRIBED")
obj = Unsubscribed(request)
return obj
| -1,833,999,806,823,052,500
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unsubscribed.MESSAGE_TYPE))
if (len(wmsg) != 2):
raise ProtocolError('invalid message length {0} for UNSUBSCRIBED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNSUBSCRIBED")
obj = Unsubscribed(request)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Unsubscribed.MESSAGE_TYPE, self.request]
| 4,494,053,048,241,034,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Unsubscribed.MESSAGE_TYPE, self.request]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP UNSUBSCRIBED Message (request = {0})'.format(self.request)
| 4,165,905,520,912,640,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP UNSUBSCRIBED Message (request = {0})'.format(self.request)
|
def __init__(self, subscription, publication, args=None, kwargs=None, publisher=None):
'\n\n :param subscription: The subscription ID this event is dispatched under.\n :type subscription: int\n :param publication: The publication ID of the dispatched event.\n :type publication: int\n :param args: Positional values for application-defined exception.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined exception.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param publisher: If present, the WAMP session ID of the publisher of this event.\n :type publisher: int or None\n '
assert (type(subscription) in six.integer_types)
assert (type(publication) in six.integer_types)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((publisher is None) or (type(publisher) in six.integer_types))
Message.__init__(self)
self.subscription = subscription
self.publication = publication
self.args = args
self.kwargs = kwargs
self.publisher = publisher
| -2,682,529,155,233,320,400
|
:param subscription: The subscription ID this event is dispatched under.
:type subscription: int
:param publication: The publication ID of the dispatched event.
:type publication: int
:param args: Positional values for application-defined exception.
Must be serializable using any serializers in use.
:type args: list or tuple or None
:param kwargs: Keyword values for application-defined exception.
Must be serializable using any serializers in use.
:type kwargs: dict or None
:param publisher: If present, the WAMP session ID of the publisher of this event.
:type publisher: int or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, subscription, publication, args=None, kwargs=None, publisher=None):
'\n\n :param subscription: The subscription ID this event is dispatched under.\n :type subscription: int\n :param publication: The publication ID of the dispatched event.\n :type publication: int\n :param args: Positional values for application-defined exception.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined exception.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param publisher: If present, the WAMP session ID of the publisher of this event.\n :type publisher: int or None\n '
assert (type(subscription) in six.integer_types)
assert (type(publication) in six.integer_types)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((publisher is None) or (type(publisher) in six.integer_types))
Message.__init__(self)
self.subscription = subscription
self.publication = publication
self.args = args
self.kwargs = kwargs
self.publisher = publisher
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Event.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for EVENT'.format(len(wmsg)))
subscription = check_or_raise_id(wmsg[1], "'subscription' in EVENT")
publication = check_or_raise_id(wmsg[2], "'publication' in EVENT")
details = check_or_raise_extra(wmsg[3], "'details' in EVENT")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in EVENT".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in EVENT".format(type(kwargs)))
publisher = None
if (u'publisher' in details):
detail_publisher = details[u'publisher']
if (type(detail_publisher) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'publisher' detail in EVENT".format(type(detail_publisher)))
publisher = detail_publisher
obj = Event(subscription, publication, args=args, kwargs=kwargs, publisher=publisher)
return obj
| 3,918,332,664,157,613,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Event.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for EVENT'.format(len(wmsg)))
subscription = check_or_raise_id(wmsg[1], "'subscription' in EVENT")
publication = check_or_raise_id(wmsg[2], "'publication' in EVENT")
details = check_or_raise_extra(wmsg[3], "'details' in EVENT")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in EVENT".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in EVENT".format(type(kwargs)))
publisher = None
if (u'publisher' in details):
detail_publisher = details[u'publisher']
if (type(detail_publisher) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'publisher' detail in EVENT".format(type(detail_publisher)))
publisher = detail_publisher
obj = Event(subscription, publication, args=args, kwargs=kwargs, publisher=publisher)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
details = {}
if (self.publisher is not None):
details[u'publisher'] = self.publisher
if self.kwargs:
return [Event.MESSAGE_TYPE, self.subscription, self.publication, details, self.args, self.kwargs]
elif self.args:
return [Event.MESSAGE_TYPE, self.subscription, self.publication, details, self.args]
else:
return [Event.MESSAGE_TYPE, self.subscription, self.publication, details]
| 2,133,001,055,609,564,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
details = {}
if (self.publisher is not None):
details[u'publisher'] = self.publisher
if self.kwargs:
return [Event.MESSAGE_TYPE, self.subscription, self.publication, details, self.args, self.kwargs]
elif self.args:
return [Event.MESSAGE_TYPE, self.subscription, self.publication, details, self.args]
else:
return [Event.MESSAGE_TYPE, self.subscription, self.publication, details]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP EVENT Message (subscription = {0}, publication = {1}, args = {2}, kwargs = {3}, publisher = {4})'.format(self.subscription, self.publication, self.args, self.kwargs, self.publisher)
| -7,227,111,583,560,457,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP EVENT Message (subscription = {0}, publication = {1}, args = {2}, kwargs = {3}, publisher = {4})'.format(self.subscription, self.publication, self.args, self.kwargs, self.publisher)
|
def __init__(self, request, procedure, args=None, kwargs=None, timeout=None, receive_progress=None, discloseMe=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param procedure: The WAMP or application URI of the procedure which should be called.\n :type procedure: unicode\n :param args: Positional values for application-defined call arguments.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined call arguments.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param timeout: If present, let the callee automatically cancel\n the call after this ms.\n :type timeout: int or None\n :param receive_progress: If ``True``, indicates that the caller wants to receive\n progressive call results.\n :type receive_progress: bool or None\n :param discloseMe: If ``True``, the caller requests to disclose itself to the callee.\n :type discloseMe: bool or None\n '
assert (type(request) in six.integer_types)
assert (type(procedure) == six.text_type)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((timeout is None) or (type(timeout) in six.integer_types))
assert ((receive_progress is None) or (type(receive_progress) == bool))
assert ((discloseMe is None) or (type(discloseMe) == bool))
Message.__init__(self)
self.request = request
self.procedure = procedure
self.args = args
self.kwargs = kwargs
self.timeout = timeout
self.receive_progress = receive_progress
self.discloseMe = discloseMe
| -5,463,839,319,834,373,000
|
:param request: The WAMP request ID of this request.
:type request: int
:param procedure: The WAMP or application URI of the procedure which should be called.
:type procedure: unicode
:param args: Positional values for application-defined call arguments.
Must be serializable using any serializers in use.
:type args: list or tuple or None
:param kwargs: Keyword values for application-defined call arguments.
Must be serializable using any serializers in use.
:type kwargs: dict or None
:param timeout: If present, let the callee automatically cancel
the call after this ms.
:type timeout: int or None
:param receive_progress: If ``True``, indicates that the caller wants to receive
progressive call results.
:type receive_progress: bool or None
:param discloseMe: If ``True``, the caller requests to disclose itself to the callee.
:type discloseMe: bool or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, procedure, args=None, kwargs=None, timeout=None, receive_progress=None, discloseMe=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param procedure: The WAMP or application URI of the procedure which should be called.\n :type procedure: unicode\n :param args: Positional values for application-defined call arguments.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined call arguments.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param timeout: If present, let the callee automatically cancel\n the call after this ms.\n :type timeout: int or None\n :param receive_progress: If ``True``, indicates that the caller wants to receive\n progressive call results.\n :type receive_progress: bool or None\n :param discloseMe: If ``True``, the caller requests to disclose itself to the callee.\n :type discloseMe: bool or None\n '
assert (type(request) in six.integer_types)
assert (type(procedure) == six.text_type)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((timeout is None) or (type(timeout) in six.integer_types))
assert ((receive_progress is None) or (type(receive_progress) == bool))
assert ((discloseMe is None) or (type(discloseMe) == bool))
Message.__init__(self)
self.request = request
self.procedure = procedure
self.args = args
self.kwargs = kwargs
self.timeout = timeout
self.receive_progress = receive_progress
self.discloseMe = discloseMe
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Call.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for CALL'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in CALL")
options = check_or_raise_extra(wmsg[2], "'options' in CALL")
procedure = check_or_raise_uri(wmsg[3], "'procedure' in CALL")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in CALL".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in CALL".format(type(kwargs)))
timeout = None
if (u'timeout' in options):
option_timeout = options[u'timeout']
if (type(option_timeout) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'timeout' option in CALL".format(type(option_timeout)))
if (option_timeout < 0):
raise ProtocolError("invalid value {0} for 'timeout' option in CALL".format(option_timeout))
timeout = option_timeout
receive_progress = None
if (u'receive_progress' in options):
option_receive_progress = options[u'receive_progress']
if (type(option_receive_progress) != bool):
raise ProtocolError("invalid type {0} for 'receive_progress' option in CALL".format(type(option_receive_progress)))
receive_progress = option_receive_progress
discloseMe = None
if (u'disclose_me' in options):
option_discloseMe = options[u'disclose_me']
if (type(option_discloseMe) != bool):
raise ProtocolError("invalid type {0} for 'disclose_me' option in CALL".format(type(option_discloseMe)))
discloseMe = option_discloseMe
obj = Call(request, procedure, args=args, kwargs=kwargs, timeout=timeout, receive_progress=receive_progress, discloseMe=discloseMe)
return obj
| -1,204,407,897,505,737,200
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Call.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for CALL'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in CALL")
options = check_or_raise_extra(wmsg[2], "'options' in CALL")
procedure = check_or_raise_uri(wmsg[3], "'procedure' in CALL")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in CALL".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in CALL".format(type(kwargs)))
timeout = None
if (u'timeout' in options):
option_timeout = options[u'timeout']
if (type(option_timeout) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'timeout' option in CALL".format(type(option_timeout)))
if (option_timeout < 0):
raise ProtocolError("invalid value {0} for 'timeout' option in CALL".format(option_timeout))
timeout = option_timeout
receive_progress = None
if (u'receive_progress' in options):
option_receive_progress = options[u'receive_progress']
if (type(option_receive_progress) != bool):
raise ProtocolError("invalid type {0} for 'receive_progress' option in CALL".format(type(option_receive_progress)))
receive_progress = option_receive_progress
discloseMe = None
if (u'disclose_me' in options):
option_discloseMe = options[u'disclose_me']
if (type(option_discloseMe) != bool):
raise ProtocolError("invalid type {0} for 'disclose_me' option in CALL".format(type(option_discloseMe)))
discloseMe = option_discloseMe
obj = Call(request, procedure, args=args, kwargs=kwargs, timeout=timeout, receive_progress=receive_progress, discloseMe=discloseMe)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
options = {}
if (self.timeout is not None):
options[u'timeout'] = self.timeout
if (self.receive_progress is not None):
options[u'receive_progress'] = self.receive_progress
if (self.discloseMe is not None):
options[u'disclose_me'] = self.discloseMe
if self.kwargs:
return [Call.MESSAGE_TYPE, self.request, options, self.procedure, self.args, self.kwargs]
elif self.args:
return [Call.MESSAGE_TYPE, self.request, options, self.procedure, self.args]
else:
return [Call.MESSAGE_TYPE, self.request, options, self.procedure]
| 6,505,781,812,456,479,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
options = {}
if (self.timeout is not None):
options[u'timeout'] = self.timeout
if (self.receive_progress is not None):
options[u'receive_progress'] = self.receive_progress
if (self.discloseMe is not None):
options[u'disclose_me'] = self.discloseMe
if self.kwargs:
return [Call.MESSAGE_TYPE, self.request, options, self.procedure, self.args, self.kwargs]
elif self.args:
return [Call.MESSAGE_TYPE, self.request, options, self.procedure, self.args]
else:
return [Call.MESSAGE_TYPE, self.request, options, self.procedure]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP CALL Message (request = {0}, procedure = {1}, args = {2}, kwargs = {3}, timeout = {4}, receive_progress = {5}, discloseMe = {6})'.format(self.request, self.procedure, self.args, self.kwargs, self.timeout, self.receive_progress, self.discloseMe)
| -7,615,994,762,020,056,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP CALL Message (request = {0}, procedure = {1}, args = {2}, kwargs = {3}, timeout = {4}, receive_progress = {5}, discloseMe = {6})'.format(self.request, self.procedure, self.args, self.kwargs, self.timeout, self.receive_progress, self.discloseMe)
|
def __init__(self, request, mode=None):
'\n\n :param request: The WAMP request ID of the original `CALL` to cancel.\n :type request: int\n :param mode: Specifies how to cancel the call (``"skip"``, ``"abort"`` or ``"kill"``).\n :type mode: unicode or None\n '
assert (type(request) in six.integer_types)
assert ((mode is None) or (type(mode) == six.text_type))
assert (mode in [None, self.SKIP, self.ABORT, self.KILL])
Message.__init__(self)
self.request = request
self.mode = mode
| 2,143,286,259,950,108,200
|
:param request: The WAMP request ID of the original `CALL` to cancel.
:type request: int
:param mode: Specifies how to cancel the call (``"skip"``, ``"abort"`` or ``"kill"``).
:type mode: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, mode=None):
'\n\n :param request: The WAMP request ID of the original `CALL` to cancel.\n :type request: int\n :param mode: Specifies how to cancel the call (``"skip"``, ``"abort"`` or ``"kill"``).\n :type mode: unicode or None\n '
assert (type(request) in six.integer_types)
assert ((mode is None) or (type(mode) == six.text_type))
assert (mode in [None, self.SKIP, self.ABORT, self.KILL])
Message.__init__(self)
self.request = request
self.mode = mode
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Cancel.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for CANCEL'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in CANCEL")
options = check_or_raise_extra(wmsg[2], "'options' in CANCEL")
mode = None
if (u'mode' in options):
option_mode = options[u'mode']
if (type(option_mode) != six.text_type):
raise ProtocolError("invalid type {0} for 'mode' option in CANCEL".format(type(option_mode)))
if (option_mode not in [Cancel.SKIP, Cancel.ABORT, Cancel.KILL]):
raise ProtocolError("invalid value '{0}' for 'mode' option in CANCEL".format(option_mode))
mode = option_mode
obj = Cancel(request, mode=mode)
return obj
| 33,061,958,616,774,804
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Cancel.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for CANCEL'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in CANCEL")
options = check_or_raise_extra(wmsg[2], "'options' in CANCEL")
mode = None
if (u'mode' in options):
option_mode = options[u'mode']
if (type(option_mode) != six.text_type):
raise ProtocolError("invalid type {0} for 'mode' option in CANCEL".format(type(option_mode)))
if (option_mode not in [Cancel.SKIP, Cancel.ABORT, Cancel.KILL]):
raise ProtocolError("invalid value '{0}' for 'mode' option in CANCEL".format(option_mode))
mode = option_mode
obj = Cancel(request, mode=mode)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
options = {}
if (self.mode is not None):
options[u'mode'] = self.mode
return [Cancel.MESSAGE_TYPE, self.request, options]
| -7,155,456,867,348,995,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
options = {}
if (self.mode is not None):
options[u'mode'] = self.mode
return [Cancel.MESSAGE_TYPE, self.request, options]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return "WAMP CANCEL Message (request = {0}, mode = '{1}'')".format(self.request, self.mode)
| -8,349,347,776,118,154,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return "WAMP CANCEL Message (request = {0}, mode = '{1})".format(self.request, self.mode)
|
def __init__(self, request, args=None, kwargs=None, progress=None):
'\n\n :param request: The request ID of the original `CALL` request.\n :type request: int\n :param args: Positional values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param progress: If ``True``, this result is a progressive call result, and subsequent\n results (or a final error) will follow.\n :type progress: bool or None\n '
assert (type(request) in six.integer_types)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((progress is None) or (type(progress) == bool))
Message.__init__(self)
self.request = request
self.args = args
self.kwargs = kwargs
self.progress = progress
| 4,629,218,798,451,980,000
|
:param request: The request ID of the original `CALL` request.
:type request: int
:param args: Positional values for application-defined event payload.
Must be serializable using any serializers in use.
:type args: list or tuple or None
:param kwargs: Keyword values for application-defined event payload.
Must be serializable using any serializers in use.
:type kwargs: dict or None
:param progress: If ``True``, this result is a progressive call result, and subsequent
results (or a final error) will follow.
:type progress: bool or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, args=None, kwargs=None, progress=None):
'\n\n :param request: The request ID of the original `CALL` request.\n :type request: int\n :param args: Positional values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param progress: If ``True``, this result is a progressive call result, and subsequent\n results (or a final error) will follow.\n :type progress: bool or None\n '
assert (type(request) in six.integer_types)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((progress is None) or (type(progress) == bool))
Message.__init__(self)
self.request = request
self.args = args
self.kwargs = kwargs
self.progress = progress
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Result.MESSAGE_TYPE))
if (len(wmsg) not in (3, 4, 5)):
raise ProtocolError('invalid message length {0} for RESULT'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in RESULT")
details = check_or_raise_extra(wmsg[2], "'details' in RESULT")
args = None
if (len(wmsg) > 3):
args = wmsg[3]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in RESULT".format(type(args)))
kwargs = None
if (len(wmsg) > 4):
kwargs = wmsg[4]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in RESULT".format(type(kwargs)))
progress = None
if (u'progress' in details):
detail_progress = details[u'progress']
if (type(detail_progress) != bool):
raise ProtocolError("invalid type {0} for 'progress' option in RESULT".format(type(detail_progress)))
progress = detail_progress
obj = Result(request, args=args, kwargs=kwargs, progress=progress)
return obj
| 295,355,586,542,719,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Result.MESSAGE_TYPE))
if (len(wmsg) not in (3, 4, 5)):
raise ProtocolError('invalid message length {0} for RESULT'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in RESULT")
details = check_or_raise_extra(wmsg[2], "'details' in RESULT")
args = None
if (len(wmsg) > 3):
args = wmsg[3]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in RESULT".format(type(args)))
kwargs = None
if (len(wmsg) > 4):
kwargs = wmsg[4]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in RESULT".format(type(kwargs)))
progress = None
if (u'progress' in details):
detail_progress = details[u'progress']
if (type(detail_progress) != bool):
raise ProtocolError("invalid type {0} for 'progress' option in RESULT".format(type(detail_progress)))
progress = detail_progress
obj = Result(request, args=args, kwargs=kwargs, progress=progress)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
details = {}
if (self.progress is not None):
details[u'progress'] = self.progress
if self.kwargs:
return [Result.MESSAGE_TYPE, self.request, details, self.args, self.kwargs]
elif self.args:
return [Result.MESSAGE_TYPE, self.request, details, self.args]
else:
return [Result.MESSAGE_TYPE, self.request, details]
| -275,907,170,958,222,400
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
details = {}
if (self.progress is not None):
details[u'progress'] = self.progress
if self.kwargs:
return [Result.MESSAGE_TYPE, self.request, details, self.args, self.kwargs]
elif self.args:
return [Result.MESSAGE_TYPE, self.request, details, self.args]
else:
return [Result.MESSAGE_TYPE, self.request, details]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP RESULT Message (request = {0}, args = {1}, kwargs = {2}, progress = {3})'.format(self.request, self.args, self.kwargs, self.progress)
| 1,076,549,161,262,454,100
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP RESULT Message (request = {0}, args = {1}, kwargs = {2}, progress = {3})'.format(self.request, self.args, self.kwargs, self.progress)
|
def __init__(self, request, procedure, pkeys=None, discloseCaller=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param procedure: The WAMP or application URI of the RPC endpoint provided.\n :type procedure: unicode\n :param pkeys: The endpoint can work for this list of application partition keys.\n :type pkeys: list of int or None\n :param discloseCaller: If ``True``, the (registering) callee requests to disclose\n the identity of callers whenever called.\n :type discloseCaller: bool or None\n '
assert (type(request) in six.integer_types)
assert (type(procedure) == six.text_type)
assert ((pkeys is None) or (type(pkeys) == list))
if pkeys:
for k in pkeys:
assert (type(k) in six.integer_types)
assert ((discloseCaller is None) or (type(discloseCaller) == bool))
Message.__init__(self)
self.request = request
self.procedure = procedure
self.pkeys = pkeys
self.discloseCaller = discloseCaller
| 2,520,915,726,341,511,000
|
:param request: The WAMP request ID of this request.
:type request: int
:param procedure: The WAMP or application URI of the RPC endpoint provided.
:type procedure: unicode
:param pkeys: The endpoint can work for this list of application partition keys.
:type pkeys: list of int or None
:param discloseCaller: If ``True``, the (registering) callee requests to disclose
the identity of callers whenever called.
:type discloseCaller: bool or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, procedure, pkeys=None, discloseCaller=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param procedure: The WAMP or application URI of the RPC endpoint provided.\n :type procedure: unicode\n :param pkeys: The endpoint can work for this list of application partition keys.\n :type pkeys: list of int or None\n :param discloseCaller: If ``True``, the (registering) callee requests to disclose\n the identity of callers whenever called.\n :type discloseCaller: bool or None\n '
assert (type(request) in six.integer_types)
assert (type(procedure) == six.text_type)
assert ((pkeys is None) or (type(pkeys) == list))
if pkeys:
for k in pkeys:
assert (type(k) in six.integer_types)
assert ((discloseCaller is None) or (type(discloseCaller) == bool))
Message.__init__(self)
self.request = request
self.procedure = procedure
self.pkeys = pkeys
self.discloseCaller = discloseCaller
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Register.MESSAGE_TYPE))
if (len(wmsg) != 4):
raise ProtocolError('invalid message length {0} for REGISTER'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in REGISTER")
options = check_or_raise_extra(wmsg[2], "'options' in REGISTER")
procedure = check_or_raise_uri(wmsg[3], "'procedure' in REGISTER")
pkeys = None
discloseCaller = None
if (u'pkeys' in options):
option_pkeys = options[u'pkeys']
if (type(option_pkeys) != list):
raise ProtocolError("invalid type {0} for 'pkeys' option in REGISTER".format(type(option_pkeys)))
for pk in option_pkeys:
if (type(pk) not in six.integer_types):
raise ProtocolError("invalid type for value '{0}' in 'pkeys' option in REGISTER".format(type(pk)))
pkeys = option_pkeys
if (u'disclose_caller' in options):
option_discloseCaller = options[u'disclose_caller']
if (type(option_discloseCaller) != bool):
raise ProtocolError("invalid type {0} for 'disclose_caller' option in REGISTER".format(type(option_discloseCaller)))
discloseCaller = option_discloseCaller
obj = Register(request, procedure, pkeys=pkeys, discloseCaller=discloseCaller)
return obj
| -3,308,798,665,377,164,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Register.MESSAGE_TYPE))
if (len(wmsg) != 4):
raise ProtocolError('invalid message length {0} for REGISTER'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in REGISTER")
options = check_or_raise_extra(wmsg[2], "'options' in REGISTER")
procedure = check_or_raise_uri(wmsg[3], "'procedure' in REGISTER")
pkeys = None
discloseCaller = None
if (u'pkeys' in options):
option_pkeys = options[u'pkeys']
if (type(option_pkeys) != list):
raise ProtocolError("invalid type {0} for 'pkeys' option in REGISTER".format(type(option_pkeys)))
for pk in option_pkeys:
if (type(pk) not in six.integer_types):
raise ProtocolError("invalid type for value '{0}' in 'pkeys' option in REGISTER".format(type(pk)))
pkeys = option_pkeys
if (u'disclose_caller' in options):
option_discloseCaller = options[u'disclose_caller']
if (type(option_discloseCaller) != bool):
raise ProtocolError("invalid type {0} for 'disclose_caller' option in REGISTER".format(type(option_discloseCaller)))
discloseCaller = option_discloseCaller
obj = Register(request, procedure, pkeys=pkeys, discloseCaller=discloseCaller)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
options = {}
if (self.pkeys is not None):
options[u'pkeys'] = self.pkeys
if (self.discloseCaller is not None):
options[u'disclose_caller'] = self.discloseCaller
return [Register.MESSAGE_TYPE, self.request, options, self.procedure]
| -7,941,067,258,562,064,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
options = {}
if (self.pkeys is not None):
options[u'pkeys'] = self.pkeys
if (self.discloseCaller is not None):
options[u'disclose_caller'] = self.discloseCaller
return [Register.MESSAGE_TYPE, self.request, options, self.procedure]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP REGISTER Message (request = {0}, procedure = {1}, pkeys = {2}, discloseCaller = {3})'.format(self.request, self.procedure, self.pkeys, self.discloseCaller)
| -2,940,545,928,596,263,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP REGISTER Message (request = {0}, procedure = {1}, pkeys = {2}, discloseCaller = {3})'.format(self.request, self.procedure, self.pkeys, self.discloseCaller)
|
def __init__(self, request, registration):
'\n\n :param request: The request ID of the original ``REGISTER`` request.\n :type request: int\n :param registration: The registration ID for the registered procedure (or procedure pattern).\n :type registration: int\n '
assert (type(request) in six.integer_types)
assert (type(registration) in six.integer_types)
Message.__init__(self)
self.request = request
self.registration = registration
| -2,525,965,274,203,870,700
|
:param request: The request ID of the original ``REGISTER`` request.
:type request: int
:param registration: The registration ID for the registered procedure (or procedure pattern).
:type registration: int
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, registration):
'\n\n :param request: The request ID of the original ``REGISTER`` request.\n :type request: int\n :param registration: The registration ID for the registered procedure (or procedure pattern).\n :type registration: int\n '
assert (type(request) in six.integer_types)
assert (type(registration) in six.integer_types)
Message.__init__(self)
self.request = request
self.registration = registration
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Registered.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for REGISTERED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in REGISTERED")
registration = check_or_raise_id(wmsg[2], "'registration' in REGISTERED")
obj = Registered(request, registration)
return obj
| -8,914,548,201,261,089,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Registered.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for REGISTERED'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in REGISTERED")
registration = check_or_raise_id(wmsg[2], "'registration' in REGISTERED")
obj = Registered(request, registration)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Registered.MESSAGE_TYPE, self.request, self.registration]
| 988,125,593,362,735,900
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Registered.MESSAGE_TYPE, self.request, self.registration]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP REGISTERED Message (request = {0}, registration = {1})'.format(self.request, self.registration)
| 9,196,322,498,075,583,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP REGISTERED Message (request = {0}, registration = {1})'.format(self.request, self.registration)
|
def __init__(self, request, registration):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param registration: The registration ID for the registration to unregister.\n :type registration: int\n '
assert (type(request) in six.integer_types)
assert (type(registration) in six.integer_types)
Message.__init__(self)
self.request = request
self.registration = registration
| -1,648,807,967,556,353,500
|
:param request: The WAMP request ID of this request.
:type request: int
:param registration: The registration ID for the registration to unregister.
:type registration: int
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, registration):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param registration: The registration ID for the registration to unregister.\n :type registration: int\n '
assert (type(request) in six.integer_types)
assert (type(registration) in six.integer_types)
Message.__init__(self)
self.request = request
self.registration = registration
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unregister.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for WAMP UNREGISTER'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNREGISTER")
registration = check_or_raise_id(wmsg[2], "'registration' in UNREGISTER")
obj = Unregister(request, registration)
return obj
| -9,079,225,318,252,179,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unregister.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for WAMP UNREGISTER'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNREGISTER")
registration = check_or_raise_id(wmsg[2], "'registration' in UNREGISTER")
obj = Unregister(request, registration)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Unregister.MESSAGE_TYPE, self.request, self.registration]
| -3,603,885,114,003,554,300
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Unregister.MESSAGE_TYPE, self.request, self.registration]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP UNREGISTER Message (request = {0}, registration = {1})'.format(self.request, self.registration)
| -7,125,596,803,116,806,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP UNREGISTER Message (request = {0}, registration = {1})'.format(self.request, self.registration)
|
def __init__(self, request):
'\n\n :param request: The request ID of the original ``UNREGISTER`` request.\n :type request: int\n '
assert (type(request) in six.integer_types)
Message.__init__(self)
self.request = request
| -7,183,387,760,232,620,000
|
:param request: The request ID of the original ``UNREGISTER`` request.
:type request: int
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request):
'\n\n :param request: The request ID of the original ``UNREGISTER`` request.\n :type request: int\n '
assert (type(request) in six.integer_types)
Message.__init__(self)
self.request = request
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unregistered.MESSAGE_TYPE))
if (len(wmsg) != 2):
raise ProtocolError('invalid message length {0} for UNREGISTER'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNREGISTER")
obj = Unregistered(request)
return obj
| 1,284,982,918,187,544,800
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Unregistered.MESSAGE_TYPE))
if (len(wmsg) != 2):
raise ProtocolError('invalid message length {0} for UNREGISTER'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in UNREGISTER")
obj = Unregistered(request)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
return [Unregistered.MESSAGE_TYPE, self.request]
| -8,715,574,675,582,618,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
return [Unregistered.MESSAGE_TYPE, self.request]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP UNREGISTER Message (request = {0})'.format(self.request)
| -4,433,971,098,787,501,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP UNREGISTER Message (request = {0})'.format(self.request)
|
def __init__(self, request, registration, args=None, kwargs=None, timeout=None, receive_progress=None, caller=None, authid=None, authrole=None, authmethod=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param registration: The registration ID of the endpoint to be invoked.\n :type registration: int\n :param args: Positional values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param timeout: If present, let the callee automatically cancels\n the invocation after this ms.\n :type timeout: int or None\n :param receive_progress: Indicates if the callee should produce progressive results.\n :type receive_progress: bool or None\n :param caller: The WAMP session ID of the caller.\n :type caller: int or None\n :param authid: The authentication ID of the caller.\n :type authid: unicode or None\n :param authrole: The authentication role of the caller.\n :type authrole: unicode or None\n :param authmethod: The authentication method under which the caller was authenticated.\n :type authmethod: unicode or None\n '
assert (type(request) in six.integer_types)
assert (type(registration) in six.integer_types)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((timeout is None) or (type(timeout) in six.integer_types))
assert ((receive_progress is None) or (type(receive_progress) == bool))
assert ((caller is None) or (type(caller) in six.integer_types))
assert ((authid is None) or (type(authid) == six.text_type))
assert ((authrole is None) or (type(authrole) == six.text_type))
assert ((authmethod is None) or (type(authmethod) == six.text_type))
Message.__init__(self)
self.request = request
self.registration = registration
self.args = args
self.kwargs = kwargs
self.timeout = timeout
self.receive_progress = receive_progress
self.caller = caller
self.authid = authid
self.authrole = authrole
self.authmethod = authmethod
| 6,873,873,071,200,764,000
|
:param request: The WAMP request ID of this request.
:type request: int
:param registration: The registration ID of the endpoint to be invoked.
:type registration: int
:param args: Positional values for application-defined event payload.
Must be serializable using any serializers in use.
:type args: list or tuple or None
:param kwargs: Keyword values for application-defined event payload.
Must be serializable using any serializers in use.
:type kwargs: dict or None
:param timeout: If present, let the callee automatically cancels
the invocation after this ms.
:type timeout: int or None
:param receive_progress: Indicates if the callee should produce progressive results.
:type receive_progress: bool or None
:param caller: The WAMP session ID of the caller.
:type caller: int or None
:param authid: The authentication ID of the caller.
:type authid: unicode or None
:param authrole: The authentication role of the caller.
:type authrole: unicode or None
:param authmethod: The authentication method under which the caller was authenticated.
:type authmethod: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, registration, args=None, kwargs=None, timeout=None, receive_progress=None, caller=None, authid=None, authrole=None, authmethod=None):
'\n\n :param request: The WAMP request ID of this request.\n :type request: int\n :param registration: The registration ID of the endpoint to be invoked.\n :type registration: int\n :param args: Positional values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type args: list or tuple or None\n :param kwargs: Keyword values for application-defined event payload.\n Must be serializable using any serializers in use.\n :type kwargs: dict or None\n :param timeout: If present, let the callee automatically cancels\n the invocation after this ms.\n :type timeout: int or None\n :param receive_progress: Indicates if the callee should produce progressive results.\n :type receive_progress: bool or None\n :param caller: The WAMP session ID of the caller.\n :type caller: int or None\n :param authid: The authentication ID of the caller.\n :type authid: unicode or None\n :param authrole: The authentication role of the caller.\n :type authrole: unicode or None\n :param authmethod: The authentication method under which the caller was authenticated.\n :type authmethod: unicode or None\n '
assert (type(request) in six.integer_types)
assert (type(registration) in six.integer_types)
assert ((args is None) or (type(args) in [list, tuple]))
assert ((kwargs is None) or (type(kwargs) == dict))
assert ((timeout is None) or (type(timeout) in six.integer_types))
assert ((receive_progress is None) or (type(receive_progress) == bool))
assert ((caller is None) or (type(caller) in six.integer_types))
assert ((authid is None) or (type(authid) == six.text_type))
assert ((authrole is None) or (type(authrole) == six.text_type))
assert ((authmethod is None) or (type(authmethod) == six.text_type))
Message.__init__(self)
self.request = request
self.registration = registration
self.args = args
self.kwargs = kwargs
self.timeout = timeout
self.receive_progress = receive_progress
self.caller = caller
self.authid = authid
self.authrole = authrole
self.authmethod = authmethod
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Invocation.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for INVOCATION'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in INVOCATION")
registration = check_or_raise_id(wmsg[2], "'registration' in INVOCATION")
details = check_or_raise_extra(wmsg[3], "'details' in INVOCATION")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in INVOCATION".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in INVOCATION".format(type(kwargs)))
timeout = None
if (u'timeout' in details):
detail_timeout = details[u'timeout']
if (type(detail_timeout) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'timeout' detail in INVOCATION".format(type(detail_timeout)))
if (detail_timeout < 0):
raise ProtocolError("invalid value {0} for 'timeout' detail in INVOCATION".format(detail_timeout))
timeout = detail_timeout
receive_progress = None
if (u'receive_progress' in details):
detail_receive_progress = details[u'receive_progress']
if (type(detail_receive_progress) != bool):
raise ProtocolError("invalid type {0} for 'receive_progress' detail in INVOCATION".format(type(detail_receive_progress)))
receive_progress = detail_receive_progress
caller = None
if (u'caller' in details):
detail_caller = details[u'caller']
if (type(detail_caller) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'caller' detail in INVOCATION".format(type(detail_caller)))
caller = detail_caller
authid = None
if (u'authid' in details):
detail_authid = details[u'authid']
if (type(detail_authid) != six.text_type):
raise ProtocolError("invalid type {0} for 'authid' detail in INVOCATION".format(type(detail_authid)))
authid = detail_authid
authrole = None
if (u'authrole' in details):
detail_authrole = details[u'authrole']
if (type(detail_authrole) != six.text_type):
raise ProtocolError("invalid type {0} for 'authrole' detail in INVOCATION".format(type(detail_authrole)))
authrole = detail_authrole
authmethod = None
if (u'authmethod' in details):
detail_authmethod = details[u'authmethod']
if (type(detail_authmethod) != six.text_type):
raise ProtocolError("invalid type {0} for 'authmethod' detail in INVOCATION".format(type(detail_authmethod)))
authmethod = detail_authmethod
obj = Invocation(request, registration, args=args, kwargs=kwargs, timeout=timeout, receive_progress=receive_progress, caller=caller, authid=authid, authrole=authrole, authmethod=authmethod)
return obj
| 6,234,621,773,910,920,000
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Invocation.MESSAGE_TYPE))
if (len(wmsg) not in (4, 5, 6)):
raise ProtocolError('invalid message length {0} for INVOCATION'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in INVOCATION")
registration = check_or_raise_id(wmsg[2], "'registration' in INVOCATION")
details = check_or_raise_extra(wmsg[3], "'details' in INVOCATION")
args = None
if (len(wmsg) > 4):
args = wmsg[4]
if (type(args) != list):
raise ProtocolError("invalid type {0} for 'args' in INVOCATION".format(type(args)))
kwargs = None
if (len(wmsg) > 5):
kwargs = wmsg[5]
if (type(kwargs) != dict):
raise ProtocolError("invalid type {0} for 'kwargs' in INVOCATION".format(type(kwargs)))
timeout = None
if (u'timeout' in details):
detail_timeout = details[u'timeout']
if (type(detail_timeout) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'timeout' detail in INVOCATION".format(type(detail_timeout)))
if (detail_timeout < 0):
raise ProtocolError("invalid value {0} for 'timeout' detail in INVOCATION".format(detail_timeout))
timeout = detail_timeout
receive_progress = None
if (u'receive_progress' in details):
detail_receive_progress = details[u'receive_progress']
if (type(detail_receive_progress) != bool):
raise ProtocolError("invalid type {0} for 'receive_progress' detail in INVOCATION".format(type(detail_receive_progress)))
receive_progress = detail_receive_progress
caller = None
if (u'caller' in details):
detail_caller = details[u'caller']
if (type(detail_caller) not in six.integer_types):
raise ProtocolError("invalid type {0} for 'caller' detail in INVOCATION".format(type(detail_caller)))
caller = detail_caller
authid = None
if (u'authid' in details):
detail_authid = details[u'authid']
if (type(detail_authid) != six.text_type):
raise ProtocolError("invalid type {0} for 'authid' detail in INVOCATION".format(type(detail_authid)))
authid = detail_authid
authrole = None
if (u'authrole' in details):
detail_authrole = details[u'authrole']
if (type(detail_authrole) != six.text_type):
raise ProtocolError("invalid type {0} for 'authrole' detail in INVOCATION".format(type(detail_authrole)))
authrole = detail_authrole
authmethod = None
if (u'authmethod' in details):
detail_authmethod = details[u'authmethod']
if (type(detail_authmethod) != six.text_type):
raise ProtocolError("invalid type {0} for 'authmethod' detail in INVOCATION".format(type(detail_authmethod)))
authmethod = detail_authmethod
obj = Invocation(request, registration, args=args, kwargs=kwargs, timeout=timeout, receive_progress=receive_progress, caller=caller, authid=authid, authrole=authrole, authmethod=authmethod)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
options = {}
if (self.timeout is not None):
options[u'timeout'] = self.timeout
if (self.receive_progress is not None):
options[u'receive_progress'] = self.receive_progress
if (self.caller is not None):
options[u'caller'] = self.caller
if (self.authid is not None):
options[u'authid'] = self.authid
if (self.authrole is not None):
options[u'authrole'] = self.authrole
if (self.authmethod is not None):
options[u'authmethod'] = self.authmethod
if self.kwargs:
return [Invocation.MESSAGE_TYPE, self.request, self.registration, options, self.args, self.kwargs]
elif self.args:
return [Invocation.MESSAGE_TYPE, self.request, self.registration, options, self.args]
else:
return [Invocation.MESSAGE_TYPE, self.request, self.registration, options]
| -6,915,880,562,159,247,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
options = {}
if (self.timeout is not None):
options[u'timeout'] = self.timeout
if (self.receive_progress is not None):
options[u'receive_progress'] = self.receive_progress
if (self.caller is not None):
options[u'caller'] = self.caller
if (self.authid is not None):
options[u'authid'] = self.authid
if (self.authrole is not None):
options[u'authrole'] = self.authrole
if (self.authmethod is not None):
options[u'authmethod'] = self.authmethod
if self.kwargs:
return [Invocation.MESSAGE_TYPE, self.request, self.registration, options, self.args, self.kwargs]
elif self.args:
return [Invocation.MESSAGE_TYPE, self.request, self.registration, options, self.args]
else:
return [Invocation.MESSAGE_TYPE, self.request, self.registration, options]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return 'WAMP INVOCATION Message (request = {0}, registration = {1}, args = {2}, kwargs = {3}, timeout = {4}, receive_progress = {5}, caller = {6}, authid = {7}, authrole = {8}, authmethod = {9})'.format(self.request, self.registration, self.args, self.kwargs, self.timeout, self.receive_progress, self.caller, self.authid, self.authrole, self.authmethod)
| 8,222,937,234,153,224,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return 'WAMP INVOCATION Message (request = {0}, registration = {1}, args = {2}, kwargs = {3}, timeout = {4}, receive_progress = {5}, caller = {6}, authid = {7}, authrole = {8}, authmethod = {9})'.format(self.request, self.registration, self.args, self.kwargs, self.timeout, self.receive_progress, self.caller, self.authid, self.authrole, self.authmethod)
|
def __init__(self, request, mode=None):
'\n\n :param request: The WAMP request ID of the original ``INVOCATION`` to interrupt.\n :type request: int\n :param mode: Specifies how to interrupt the invocation (``"abort"`` or ``"kill"``).\n :type mode: unicode or None\n '
assert (type(request) in six.integer_types)
assert ((mode is None) or (type(mode) == six.text_type))
assert ((mode is None) or (mode in [self.ABORT, self.KILL]))
Message.__init__(self)
self.request = request
self.mode = mode
| -5,565,241,759,184,472,000
|
:param request: The WAMP request ID of the original ``INVOCATION`` to interrupt.
:type request: int
:param mode: Specifies how to interrupt the invocation (``"abort"`` or ``"kill"``).
:type mode: unicode or None
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__init__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __init__(self, request, mode=None):
'\n\n :param request: The WAMP request ID of the original ``INVOCATION`` to interrupt.\n :type request: int\n :param mode: Specifies how to interrupt the invocation (``"abort"`` or ``"kill"``).\n :type mode: unicode or None\n '
assert (type(request) in six.integer_types)
assert ((mode is None) or (type(mode) == six.text_type))
assert ((mode is None) or (mode in [self.ABORT, self.KILL]))
Message.__init__(self)
self.request = request
self.mode = mode
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Interrupt.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for INTERRUPT'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in INTERRUPT")
options = check_or_raise_extra(wmsg[2], "'options' in INTERRUPT")
mode = None
if (u'mode' in options):
option_mode = options[u'mode']
if (type(option_mode) != six.text_type):
raise ProtocolError("invalid type {0} for 'mode' option in INTERRUPT".format(type(option_mode)))
if (option_mode not in [Interrupt.ABORT, Interrupt.KILL]):
raise ProtocolError("invalid value '{0}' for 'mode' option in INTERRUPT".format(option_mode))
mode = option_mode
obj = Interrupt(request, mode=mode)
return obj
| -1,153,685,189,384,683,500
|
Verifies and parses an unserialized raw message into an actual WAMP message instance.
:param wmsg: The unserialized raw message.
:type wmsg: list
:returns: An instance of this class.
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
parse
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
@staticmethod
def parse(wmsg):
'\n Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n :param wmsg: The unserialized raw message.\n :type wmsg: list\n\n :returns: An instance of this class.\n '
assert ((len(wmsg) > 0) and (wmsg[0] == Interrupt.MESSAGE_TYPE))
if (len(wmsg) != 3):
raise ProtocolError('invalid message length {0} for INTERRUPT'.format(len(wmsg)))
request = check_or_raise_id(wmsg[1], "'request' in INTERRUPT")
options = check_or_raise_extra(wmsg[2], "'options' in INTERRUPT")
mode = None
if (u'mode' in options):
option_mode = options[u'mode']
if (type(option_mode) != six.text_type):
raise ProtocolError("invalid type {0} for 'mode' option in INTERRUPT".format(type(option_mode)))
if (option_mode not in [Interrupt.ABORT, Interrupt.KILL]):
raise ProtocolError("invalid value '{0}' for 'mode' option in INTERRUPT".format(option_mode))
mode = option_mode
obj = Interrupt(request, mode=mode)
return obj
|
def marshal(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`\n '
options = {}
if (self.mode is not None):
options[u'mode'] = self.mode
return [Interrupt.MESSAGE_TYPE, self.request, options]
| 9,030,953,420,861,546,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.marshal`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
marshal
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def marshal(self):
'\n \n '
options = {}
if (self.mode is not None):
options[u'mode'] = self.mode
return [Interrupt.MESSAGE_TYPE, self.request, options]
|
def __str__(self):
'\n Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`\n '
return "WAMP INTERRUPT Message (request = {0}, mode = '{1}')".format(self.request, self.mode)
| 5,848,615,295,976,145,000
|
Implements :func:`autobahn.wamp.interfaces.IMessage.__str__`
|
ThirdParty/AutobahnPython/autobahn/wamp/message.py
|
__str__
|
Crimson-MITK-ThirdParty/VTK-7.0.0
|
python
|
def __str__(self):
'\n \n '
return "WAMP INTERRUPT Message (request = {0}, mode = '{1}')".format(self.request, self.mode)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.