Examples of UsageServiceClient


Examples of org.wso2.carbon.usage.ui.clients.UsageServiceClient

    public static InstanceUsageStatics[] retrieveInstanceUsage(ServletRequest request,
                                                               ServletConfig config, HttpSession session)
            throws Exception {

        try {
            UsageServiceClient serviceClient = new UsageServiceClient(config, session);
            InstanceUsageStatics[] returnInstanceUsage = serviceClient.retrieveInstanceUsage();
            return returnInstanceUsage;
        } catch (Exception e) {
            String msg = "Failed to get current instance usage.";
            log.error(msg, e);
            throw new UIException(msg, e);
View Full Code Here

Examples of org.wso2.carbon.usage.ui.clients.UsageServiceClient

        int entriesPerPage = 15;
        if (requestedPage != null && requestedPage.length() > 0) {
            pageNumber = new Integer(requestedPage);
        }
        try {
            UsageServiceClient serviceClient = new UsageServiceClient(config, session);
            String yearMonth = request.getParameter("year-month");
            if (yearMonth == null) {
                // get the current year month
                yearMonth = getCurrentYearMonth();
            }
            return serviceClient.retrievePaginatedInstanceUsage(yearMonth, pageNumber, entriesPerPage);
        } catch (Exception e) {
            String msg = "Failed to get paginated instance usages.";
            log.error(msg, e);
            throw new UIException(msg, e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.