private function executeCommand($command)
    {
        if ( !is_array($command) || !isset($command['command']) ) {
            return $this->returnError('Malformed command received.');
        }

        switch ($command['command']) {
            case 'journal': return $this->commandJournal($command);
            case 'shutdown': return $this->commandShutdown($command);
            default: return $this->returnError('Unknown command.');
        }
    }