Package org.wso2.carbon.throttling.manager.dataproviders

Examples of org.wso2.carbon.throttling.manager.dataproviders.DataProvider.invoke()


        args.put("hourToTriggerOn", "0");
        MonthlyScheduleHelper monthlyTriggerCalculator = new MonthlyScheduleHelper();
        monthlyTriggerCalculator.init(args);

        SchedulerContext schedulerContext = new SchedulerContext();
        monthlyTriggerCalculator.invoke(schedulerContext, someDateTimeStamp);

        long nextMonthFirstTimeStampDuration = schedulerContext.getNextTriggerInterval();

        long durationStart = schedulerContext.getCurrentDurationStart();
        long durationEnd = schedulerContext.getCurrentDurationEnd();
View Full Code Here


            context.setAspect(aspect);
            context.setAction(action);
            registryContext.getHandlerManager().invokeAspect(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    aspect.invoke(context, action);
                }
                resource.discard();

                // transaction succeeded
                transactionSucceeded = true;
View Full Code Here

            context.setAspect(aspect);
            context.setAction(action);
            registryContext.getHandlerManager().invokeAspect(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    aspect.invoke(context, action, parameters);
                }
                resource.discard();

                // transaction succeeded
                transactionSucceeded = true;
View Full Code Here

                        "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

            List<Object> knowledgeBase = new ArrayList<Object>();
            ThrottlingDataContext throttlingDataContext =
                    KnowledgeBaseManager.feedKnowledgeBase(tenantId, task, knowledgeBase);

            RuleInvoker ruleInvoker = task.getRuleInvoker();
            ruleInvoker.invoke(knowledgeBase);

            ValidationInfoManager.persistValidationDetails(throttlingDataContext);
        }
    }
}
View Full Code Here

        }

        // invoke the rule.
        RuleInvoker ruleInvoker = task.getRuleInvoker();
        try {
            ruleInvoker.invoke(knowledgeBase);
        } catch (ThrottlingException e) {
            String msg = "Error in invoking the ruleInvoker.";
            log.error(msg, e);
            throw new JobExecutionException(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.