Exemplo n.º 1
0
    def __init__(self,
                 name,
                 matcher,
                 pointer,
                 thread=False,
                 once=False,
                 instream=False,
                 stream=None):
        """
        Create a new callback handler.

        Arguments:
            name     -- The name of the handler.
            matcher  -- A matcher object for matching stanza objects.
            pointer  -- The function to execute during callback.
            thread   -- DEPRECATED. Remains only for backwards compatibility.
            once     -- Indicates if the handler should be used only
                        once. Defaults to False.
            instream -- Indicates if the callback should be executed
                        during stream processing instead of in the
                        main event loop.
            stream   -- The XMLStream instance this handler should monitor.
        """
        BaseHandler.__init__(self, name, matcher, stream)
        self._pointer = pointer
        self._once = once
        self._instream = instream
Exemplo n.º 2
0
    def __init__(self, name, matcher, stream=None):
        """
        Create a new Waiter.

        Arguments:
            name    -- The name of the waiter.
            matcher -- A matcher object to detect the desired stanza.
            stream  -- Optional XMLStream instance to monitor.
        """
        BaseHandler.__init__(self, name, matcher, stream=stream)
        self._payload = queue.Queue()
Exemplo n.º 3
0
    def __init__(self, name, matcher, stream=None):
        """
        Create a new Waiter.

        Arguments:
            name    -- The name of the waiter.
            matcher -- A matcher object to detect the desired stanza.
            stream  -- Optional XMLStream instance to monitor.
        """
        BaseHandler.__init__(self, name, matcher, stream=stream)
        self._payload = queue.Queue()
Exemplo n.º 4
0
 def __init__(self,
              name,
              matcher,
              pointer,
              thread=False,
              once=False,
              instream=False,
              stream=None):
     BaseHandler.__init__(self, name, matcher, stream)
     self._pointer = pointer
     self._once = once
     self._instream = instream
Exemplo n.º 5
0
    def __init__(self, name, matcher, pointer, thread=False,
                 once=False, instream=False, stream=None):
        """
        Create a new callback handler.

        Arguments:
            name     -- The name of the handler.
            matcher  -- A matcher object for matching stanza objects.
            pointer  -- The function to execute during callback.
            thread   -- DEPRECATED. Remains only for backwards compatibility.
            once     -- Indicates if the handler should be used only
                        once. Defaults to False.
            instream -- Indicates if the callback should be executed
                        during stream processing instead of in the
                        main event loop.
            stream   -- The XMLStream instance this handler should monitor.
        """
        BaseHandler.__init__(self, name, matcher, stream)
        self._pointer = pointer
        self._once = once
        self._instream = instream
Exemplo n.º 6
0
 def __init__(self, name, matcher, stream=None):
     BaseHandler.__init__(self, name, matcher, stream=stream)
     self._payload = queue.Queue()
Exemplo n.º 7
0
 def __init__(self, name, matcher, stream=None):
     BaseHandler.__init__(self, name, matcher, stream=stream)
     self._payload = Queue()
Exemplo n.º 8
0
 def __init__(self, name, matcher, pointer, thread=False, once=False, instream=False, stream=None):
     BaseHandler.__init__(self, name, matcher, stream)
     self._pointer = pointer
     self._once = once
     self._instream = instream