Package org.apache.stratos.throttling.manager.exception

Examples of org.apache.stratos.throttling.manager.exception.ThrottlingException


        try {
            task.prepareData(throttlingDataContext);
        } catch (ThrottlingException e) {
            String msg = "Error in preparing throttling data for tenant: " + tenantId + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }

        // add data entries with object types separately
        for (ThrottlingDataEntry dataEntry : throttlingDataContext.getData()) {
            if (dataEntry.getValueType() == 4) {
                Object object = dataEntry.getObjectValue();
                if (object != null) {
                    knowledgeBase.add(object);
                }
            }
        }
        // load the access validation data
        try {
            ValidationInfoManager.loadValidationDetails(throttlingDataContext);
        } catch (ThrottlingException e) {
            String msg = "Error in loading validation details. tenant id: " + tenantId + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }

        // add metering data context
        knowledgeBase.add(throttlingDataContext);
        // add access validation information
View Full Code Here


            }
        } catch (RegistryException e) {
            String msg =
                    "Error in getting the tenant validation info.  tenant id: " + tenantId + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
    }
View Full Code Here

            if (dataProvider == null) {
                String msg =
                        "Error in invoking the data provider. " + "dataProviderConfigs is null or "
                                + "data provider is not yet loaded";
                log.error(msg);
                throw new ThrottlingException(msg);
            }
            dataProvider.invoke(dataContext);
            if (dataContext.isProcessingComplete()) {
                break;
            }
View Full Code Here

                    tenantValidationInfoResource);
        } catch (RegistryException e) {
            String msg =
                    "Error in storing the tenant validation info.  tenant id: " + tenantId + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
    }
View Full Code Here

        try {
            tenants = Util.getAllTenants();
        } catch (UserStoreException e) {
            String msg = "Error in getting all the tenants.";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
        // prepare the knowledge base using data on each tenant

        for (Tenant tenant : tenants) {
            if (!tenant.isActive()) {
View Full Code Here

        try {
            cl = Class.forName(className);
        } catch (ClassNotFoundException e) {
            String msg = "The class: " + className + " is not in the classpath.";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }

        try {
            co = cl.getConstructor();
        } catch (NoSuchMethodException e) {
            String msg = "The default constructor for the  is not available for " + className + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
        try {
            obj = co.newInstance();
        } catch (Exception e) {
            String msg = "Error in initializing the object for " + className + ".";
            log.error(msg);
            throw new ThrottlingException(msg, e);
        }
        return obj;
    }
View Full Code Here

        } catch (Exception e) {
            String msg = "Error in retrieving Usage information. " + "tenant id: " + tenantId
                    + ", user name: " + userName + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }

    }
View Full Code Here

        try {
            session.execute(knowledgeBase);
        } catch (Exception e) {
            String msg = "Error occurred while executing the throttling rules: " + e.getMessage();
            log.error(msg);
            throw new ThrottlingException(msg, e);
        }
    }
View Full Code Here

        }catch(Exception e){

            String msg = "Error occurred while initializing the rule executing environment: " + e.getMessage();
            log.error(msg);
            throw new ThrottlingException(msg, e);
        }

    }
View Full Code Here

            Customer customer = Util.getCurrentBillingCustomer(tenantId);
            dataContext.addDataObject(ThrottlingDataEntryConstants.CUSTOMER, customer);
        } catch (RegistryException e) {
            String msg = "Error in getting the current customer. tenant id: " + tenantId + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
        // getting the package
        try {
            MultitenancyPackage mtPackage = Util.getCurrentBillingPackage(tenantId);
            dataContext.addDataObject(ThrottlingDataEntryConstants.PACKAGE, mtPackage);
        } catch (RegistryException e) {
            String msg = "Error in getting the multi-tenancy package. tenant id: " + tenantId + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.throttling.manager.exception.ThrottlingException

Copyright © 2018 www.massapicom. 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.