Beispiel #1
0
    def stopSession(self, console, session, message):
        """
        Terminates an active Session with the Agent, by sending a STOP_SESSION
        request.

        At some point in the future, the Agent will acknowledge the Session has
        terminated, and the __stoppedSession() callback will be invoked to
        pass update the internal state.
        """

        self.onMessage(message.id, self.__stoppedSession(console, session))

        self.write(
            SystemRequestFactory.stopSession(session).setId(
                message.id).build())