Example #1
0
    def connect(self, host="localhost", port=58846, username="", password=""):
        """
        Connects the client to a daemon
        """
        d = Deferred()
        _d = client.connect(host, port, username, password)

        def on_get_methods(methods):
            """
            Handles receiving the method names
            """
            self._remote_methods = methods
            methods = list(self._remote_methods)
            methods.extend(self._local_methods)
            d.callback(methods)

        def on_client_connected(connection_id):
            """
            Handles the client successfully connecting to the daemon and
            invokes retrieving the method names.
            """
            d = client.daemon.get_method_list()
            d.addCallback(on_get_methods)
            component.get("Web.PluginManager").start()
            component.get("Web").start()
        _d.addCallback(on_client_connected)
        return d
Example #2
0
    def connect(self, host="localhost", port=58846, username="", password=""):
        """
        Connects the client to a daemon
        """
        d = Deferred()
        _d = client.connect(host, port, username, password)

        def on_get_methods(methods):
            """
            Handles receiving the method names
            """
            self._remote_methods = methods
            methods = list(self._remote_methods)
            methods.extend(self._local_methods)
            d.callback(methods)

        def on_client_connected(connection_id):
            """
            Handles the client successfully connecting to the daemon and
            invokes retrieving the method names.
            """
            d = client.daemon.get_method_list()
            d.addCallback(on_get_methods)
            component.get("Web.PluginManager").start()
            component.get("Web").start()

        _d.addCallback(on_client_connected)
        return d
Example #3
0
    def connect(self, host="localhost", port=58846, username="", password=""):
        """
        Connects the client to a daemon
        """
        d = client.connect(host, port, username, password)

        def on_client_connected(connection_id):
            """
            Handles the client successfully connecting to the daemon and
            invokes retrieving the method names.
            """
            d = self.get_remote_methods()
            component.get("Web.PluginManager").start()
            component.get("Web").start()
            return d

        return d.addCallback(on_client_connected)
Example #4
0
    def connect(self, host="localhost", port=58846, username="", password=""):
        """
        Connects the client to a daemon
        """
        d = client.connect(host, port, username, password)

        def on_client_connected(connection_id):
            """
            Handles the client successfully connecting to the daemon and
            invokes retrieving the method names.
            """
            d = self.get_remote_methods()
            component.get("Web.PluginManager").start()
            component.get("Web").start()
            return d

        return d.addCallback(on_client_connected)