class StompReactor(object): def __init__(self): self._reactor = Reactor() def createListener(self, connected_socket, acceptHandler): listener = StompListener(self._reactor, acceptHandler, connected_socket) self._reactor.wakeup() return listener def createClient(self, connected_socket): return StompClient(connected_socket, self._reactor) def process_requests(self): self._reactor.process_requests() def stop(self): self._reactor.stop()
class StompReactor(object): def __init__(self): self._reactor = Reactor() def createListener(self, connected_socket, acceptHandler): listener = StompListener( self._reactor, acceptHandler, connected_socket ) self._reactor.wakeup() return listener def createClient(self, connected_socket): return StompClient(connected_socket, self._reactor) def process_requests(self): self._reactor.process_requests() def stop(self): self._reactor.stop()
def __init__(self): self._reactor = Reactor()