Example #1
0
 def __init__(self,
              parameters=None,
              on_open_callback=None,
              reconnection_strategy=None):
     # Run our base connection init
     BaseConnection.__init__(self, parameters, on_open_callback,
                             reconnection_strategy)
    def __init__(self, parameters=None, on_open_callback=None,
                 reconnection_strategy=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
Example #3
0
    def __init__(self, parameters=None,
                 on_open_callback=None,
                 reconnection_strategy=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
Example #4
0
    def __init__(self, parameters=None, on_open_callback=None,
                 reconnection_strategy=None, io_loop=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        # Store the passed in io_loop (for example, for unit tests)
        self.tornado_loop = io_loop

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
Example #5
0
    def __init__(self, parameters=None,
                 on_open_callback=None,
                 reconnection_strategy=None,
                 callback_interval=250,
                 io_loop=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        self.callback_interval = callback_interval
        self._pc = None
        self._default_ioloop = io_loop or IOLoop.instance()

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
Example #6
0
    def __init__(self,
                 parameters=None,
                 on_open_callback=None,
                 reconnection_strategy=None,
                 callback_interval=250,
                 io_loop=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        self.callback_interval = callback_interval
        self._pc = None
        self._default_ioloop = io_loop or IOLoop.instance()

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
Example #7
0
    def __init__(self, parameters=None,
                 on_open_callback=None,
                 reconnection_strategy=None,
                 callback_interval=250,
                 io_loop=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        self.callback_interval = callback_interval
        self._pc = None
        self._default_ioloop = io_loop or IOLoop.instance()

        on_open_callback = stack_context.wrap(on_open_callback)
        
        with stack_context.StackContext(self._stack_context):
            BaseConnection.__init__(self, parameters, on_open_callback,
                                    reconnection_strategy, CallbackManager())
Example #8
0
 def __init__(self, parameters):
     self.ready = defer.Deferred()
     BaseConnection.__init__(self, parameters, self.connectionReady)
     self.ioloop = IOLoopReactorAdapter(self, reactor)
Example #9
0
 def __init__(self, parameters=None, on_open_callback=None,
              reconnection_strategy=None):
     # Run our base connection init
     BaseConnection.__init__(self, parameters, on_open_callback,
                             reconnection_strategy)
Example #10
0
 def __init__(self, parameters):
     self.ready = defer.Deferred()
     BaseConnection.__init__(self, parameters, self.connectionReady)
     self.ioloop = IOLoopReactorAdapter(self, reactor)
Example #11
0
    def __init__(self, parameters=None, on_open_callback=None, reconnection_strategy=None):
        # Setup the IOLoop
        self.ioloop = IOLoop.instance()

        # Run our base connection init
        BaseConnection.__init__(self, parameters, on_open_callback, reconnection_strategy)
Example #12
0
 def __init__(self, parameters):
     self.ready = defer.Deferred()
     BaseConnection.__init__(self, parameters, self.connectionReady)