'The internal method to process the routing of command execution requests'

def _CommandHandler(self, conn, request):

    jid = str(request.getTo())
    try:
        node = request.getTagAttr('command', 'node')
    except:
        conn.send(Error(request, ERR_BAD_REQUEST))
        raise NodeProcessed
    if self._handlers.has_key(jid):
        if self._handlers[jid].has_key(node):
            self._handlers[jid][node]['execute'](conn, request)
        else:
            conn.send(Error(request, ERR_ITEM_NOT_FOUND))
            raise NodeProcessed
    elif self._handlers[''].has_key(node):
        self._handlers[''][node]['execute'](conn, request)
    else:
        conn.send(Error(request, ERR_ITEM_NOT_FOUND))
        raise NodeProcessed
