def __init__(self, store=None): self.store = store or Store() self.handlers = [CFlowController(), CHandshaker(), Decoder()] self.incoming = [] self.outgoing = [] self.message = Message() self.closed = False
def __init__(self, client, receiver, source, selector): super(ReceiverHandler, self).__init__("recv", client) self.receiver = receiver self.source = source self.selector = selector self.handlers = [] if receiver.prefetch: self.handlers.append(CFlowController(receiver.prefetch)) self.handlers.append(IncomingMessageHandler(True, self))
def __init__(self, delegate, source, offset, prefetch): super(PartitionReceiver, self).__init__() self.handlers = [] if prefetch: self.handlers.append(CFlowController(prefetch)) self.handlers.append(IncomingMessageHandler(True, self)) self.fatal_conditions = ["amqp:unauthorized-access", "amqp:not-found"] self.delegate = delegate self.source = source self.offset = offset self.name = str(generate_uuid())[:8] self.iteration = 0 self.client = None
def __init__(self, **kwargs): self.args = kwargs self.reactor = Container(self) self.host = "127.0.0.1" self.port = 0 if "host" in kwargs: self.host = kwargs["host"] if "port" in kwargs: self.port = kwargs["port"] self.handlers = [CFlowController(10), CHandshaker()] self.thread = Thread(name="server-thread", target=self.run) self.thread.daemon = True self.running = True self.conditions = []
def __init__(self, target, count): self.message = Message() self.target = target if target is not None else "examples" # Use the handlers property to add some default handshaking # behaviour. self.handlers = [CHandshaker(), CFlowController()] self.conn = None self.ssn = None self.sender = None self.receiver = None self.count = count self._sends = count self.start_time = None self.stop_time = None self.last_send_time = None self.total_ack_latency = 0.0 self.total_tx_latency = 0.0
def __init__(self, count): self.count = count self.handlers = [CHandshaker(), CFlowController()] self.messages = []
def __init__(self, delegate=None, window=1024): self.handlers = [CFlowController(window), CHandshaker(), Decoder()] if delegate is not None: self.handlers.append(delegate)
def __init__(self): self.handlers = [CHandshaker(), CFlowController()] self.message = Message()