def __init__(self, qos={}): self.__protocol = protocols.get_protocol(qos) self.__transport = transport.get_transport(qos) self.__allow_anonymous = False self.__anonymous = False self.__id = str(uuid.uuid4()) _DEB('Endpoint "%s" created' % self.__id)
def encoders(self, value): if not isinstance(value, list): value = [value] try: self._encoders = protocols.get_protocol(value) except NameError as e: raise ValueError("Could not parse value.", e)