Exemple #1
0
    def xmlrpc_viewpoint_startup(self):
        """Broadcasts a EVT_VIEWPOINT_STARTUP message if anyone is listening they will react.
        """
        self.log.debug("xmlrpc_startup: sending EVT_VIEWPOINT_STARTUP to the director.")
        messenger.send(messenger.EVT('EVT_VIEWPOINT_STARTUP'), {})
        self.log.debug("xmlrpc_startup: sent EVT_VIEWPOINT_STARTUP OK.")

        return 0
Exemple #2
0
    def xmlrpc_viewpoint_shutdown(self):
        """Broadcasts a EVT_VIEWPOINT_SHUTDOWN message if anyone is listening they will react.
        """
        self.log.debug("xmlrpc_shutdown: sending EVT_VIEWPOINT_SHUTDOWN to the director.")
        messenger.send(messenger.EVT('EVT_VIEWPOINT_SHUTDOWN'), {})
        self.log.debug("xmlrpc_shutdown: sent EVT_SHUTDOWN OK.")

        return 0
Exemple #3
0
    def xmlrpc_dispatch(self, reply_evt, data):
        """Dispatch the given data as a reply event.
        """
        self.log.debug("xmlrpc_dispatch: sending reply event '%s' with data '%s'" % (reply_evt, data))

        if self.testing:
            self.log.debug("xmlrpc_dispatch: Send disabled in testing mode.")
        else:
            reply = messenger.EVT(reply_evt)

            #This would require the waiting source to reply confirming receipt:
            #self.log.debug("xmlrpc_dispatch: sending, waiting for confirmation receipt.")
            # messenger.send_await(reply, data)

            # This will just send without waiting.
            self.log.debug("xmlrpc_dispatch: sending (no reply looked for)")
            messenger.send(reply, data)

            self.log.debug("xmlrpc_dispatch: sending (no reply looked for - SENT OK")

        return 0
Exemple #4
0
 def sendexit(data):
     self.log.debug("xmlrpc_exitall: sending EVT_DIRECTOR_EXIT_ALL to the director.")
     messenger.send(messenger.EVT('EVT_DIRECTOR_EXIT_ALL'), {})
     self.log.debug("xmlrpc_exitall: sent EVT_DIRECTOR_EXIT_ALL OK.")