Examples of ThrottlingException


Examples of org.wso2.carbon.throttling.manager.exception.ThrottlingException

        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

Examples of org.wso2.carbon.throttling.manager.exception.ThrottlingException

            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

Examples of org.wso2.carbon.throttling.manager.exception.ThrottlingException

            }
        } 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

Examples of org.wso2.carbon.throttling.manager.exception.ThrottlingException

                    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

Examples of org.wso2.carbon.throttling.manager.exception.ThrottlingException

        } catch (RegistryException e) {
            String msg =
                    "Error in reading the rule resource content. resource path: " +
                            StratosConstants.THROTTLING_RULES_PATH + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        } catch (Exception e) {
            String msg = "Error in loading the rules.";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }

        try {
            ruleSetDescription.setRuleSource(ruleContentResource.getContentStream());
        } catch (RegistryException e) {
            String msg = "Error in loading the rules from the content stream.";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
        // ruleSetDescription.setBindURI("file:" + ruleFile);
        String uri;
        try {
            uri = ruleEngine.addRuleSet(ruleSetDescription);
        } catch (Exception e) {
            String msg = "Error in compiling the rules.";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
        }
        SessionDescription sessionDescription = new SessionDescription();
        sessionDescription.setSessionType(SessionDescription.STATELESS_SESSION);
        sessionDescription.setRuleSetURI(uri);
View Full Code Here

Examples of org.wso2.carbon.throttling.manager.exception.ThrottlingException

        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
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.