Route an Ext Direct request to the appropriate function(s) and provide the response(s)

        :param data: Ext Direct request
        :type data: json or dict or list
        :return: appropriate response(s)
        :rtype: json

def route(self, data):
        """Route an Ext Direct request to the appropriate function(s) and provide the response(s)

        :param data: Ext Direct request
        :type data: json or dict or list
        :return: appropriate response(s)
        :rtype: json

        """
        if isinstance(data, (dict, list)):
            requests = data
        else:
            requests = json.loads(data)
        if not isinstance(requests, list):
            requests = [requests]
        responses = []
        for request in requests:
            responses.append(self.call(request))
        if len(responses) == 1:
            return json.dumps(responses[0])
        return json.dumps(responses)