def __init__(self, control_amp_service): """ :param ControlAMPService control_amp_service: The service managing AMP connections to the control service. """ CommandLocator.__init__(self) self.control_amp_service = control_amp_service
def __init__(self, agent, timeout): """ :param IConvergenceAgent agent: Convergence agent to notify of changes. :param Timeout timeout: A ``Timeout`` object to reset when a message is received. """ CommandLocator.__init__(self) self.agent = agent self._timeout = timeout
def __init__(self, agent, timeout): """ :param IConvergenceAgent agent: Convergence agent to notify of changes. :param Timeout timeout: A ``Timeout`` object to reset when a message is received. """ CommandLocator.__init__(self) self.agent = agent self._timeout = timeout self._current_configuration = None self._current_configuration_generation = None self._current_state = None self._current_state_generation = None
def locateResponder(self, name): """ Do normal responder lookup, reset the connection timeout and record this activity. """ self._timeout.reset() self._source.set_last_activity(self._reactor.seconds()) return CommandLocator.locateResponder(self, name)
def __init__(self, reactor, control_amp_service): """ :param IReactorTime reactor: A reactor to use to tell the time for activity/inactivity reporting. :param ControlAMPService control_amp_service: The service managing AMP connections to the control service. """ CommandLocator.__init__(self) # Create a brand new source to associate with changes from this # particular connection from an agent. The lifetime of the source # exactly matches the lifetime of the protocol. This is good since # after the connection is lost we can't receive any more changes from # it. self._source = ChangeSource() self._reactor = reactor self.control_amp_service = control_amp_service
def locateResponder(self, name): """ Do normal responder lookup and reset the connection timeout. """ self._timeout.reset() return CommandLocator.locateResponder(self, name)
def locateResponder(self, name): """ Do normal responder lookup and also record this activity. """ self._source.set_last_activity(self._reactor.seconds()) return CommandLocator.locateResponder(self, name)
def __init__(self, obj, methods): CommandLocator.__init__(self) self._object = obj self._methods = methods self._pending_chunks = {}
def __init__(self, agent): """ :param IConvergenceAgent agent: Convergence agent to notify of changes. """ CommandLocator.__init__(self) self.agent = agent