Package org.apache.stratos.throttling.manager.tasks

Examples of org.apache.stratos.throttling.manager.tasks.Task


    public static final String THROTTLING_TASK_CONTEXT_KEY = "throttlingTask";

    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
        carbonContext.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
        Task task = (Task) jobExecutionContext.getMergedJobDataMap().get(THROTTLING_TASK_CONTEXT_KEY);
        executeTask(task);
    }
View Full Code Here


                }
            }
        }

        // create the task instance
        task = new Task(taskParameters, dataProviderConfigs);

    }
View Full Code Here

        String configFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-config1.xml";
        String ruleFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-rules1.drl";
        // the configuration init will initialize task objects.
        //ThrottlingConfiguration ignore = new ThrottlingConfiguration(configFile);
        Task task = getThrottlingTask(configFile, ruleFile);

        Resource r1 = registry.newResource();
        r1.setContent("12345678");   // 8 byte is ok
        registry.put("/bang", r1);
View Full Code Here

        String configFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-config2.xml";
        String ruleFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-rules2.drl";
        // the configuration init will initialize task objects.
        //ThrottlingConfiguration ignore = new ThrottlingConfiguration(configFile);
        Task task = getThrottlingTask(configFile, ruleFile);

        Resource r1 = registry.newResource();
        r1.setContent("12345678");   // 8 byte in
        registry.put("/bang", r1);
        new ThrottlingJob().executeTask(task);
View Full Code Here

        String configFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-config3.xml";
        String ruleFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-rules3.drl";
        // the configuration init will initialize task objects.
        //ThrottlingConfiguration ignore = new ThrottlingConfiguration(configFile);
        Task task = getThrottlingTask(configFile, ruleFile);

        Resource r1 = registry.newResource();
        r1.setContent("12345678");   // 8 byte in

        registry.put("/bang", r1);
View Full Code Here

TOP

Related Classes of org.apache.stratos.throttling.manager.tasks.Task

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.