当前位置: 首页>>代码示例>>Java>>正文


Java DSTaskInfo.setOperationName方法代码示例

本文整理汇总了Java中org.wso2.carbon.dataservices.task.ui.stub.xsd.DSTaskInfo.setOperationName方法的典型用法代码示例。如果您正苦于以下问题:Java DSTaskInfo.setOperationName方法的具体用法?Java DSTaskInfo.setOperationName怎么用?Java DSTaskInfo.setOperationName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.wso2.carbon.dataservices.task.ui.stub.xsd.DSTaskInfo的用法示例。


在下文中一共展示了DSTaskInfo.setOperationName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addScheduleTask

import org.wso2.carbon.dataservices.task.ui.stub.xsd.DSTaskInfo; //导入方法依赖的package包/类
@Test(groups = "wso2.dss", dependsOnMethods = {"serviceInvocation"}, description = "schedule a task",
        enabled = false)
public void addScheduleTask() throws RemoteException, InterruptedException {
    dsTaskInfo = new DSTaskInfo();

    String[] taskNames = dssTaskClient.getAllTaskNames();
    empSalary = getEmployeeSalary(getEmployeeById(employeeId));
    if (taskNames != null) {
        for (String task : taskNames) {
            if (scheduleTaskName.equals(task)) {
                dssTaskClient.deleteTask(scheduleTaskName);
                log.info(scheduleTaskName + " already in scheduled. schedule task deleted");
                Thread.sleep(10000);
                break;
            }
        }
    }

    dsTaskInfo.setName(scheduleTaskName);
    dsTaskInfo.setServiceName(serviceName);
    dsTaskInfo.setOperationName("incrementEmployeeSalary");
    dsTaskInfo.setTaskInterval(taskInterval);
    dsTaskInfo.setTaskCount(-1);

    dssTaskClient.scheduleTask(dsTaskInfo);
    log.info("task scheduled");
    try {
        Thread.sleep(2000);
    } catch (InterruptedException ignore) {

    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:33,代码来源:ReScheduleTaskTestCase.java

示例2: addScheduleTask

import org.wso2.carbon.dataservices.task.ui.stub.xsd.DSTaskInfo; //导入方法依赖的package包/类
@Test(groups = "wso2.dss", dependsOnMethods = {"serviceInvocation"})
public void addScheduleTask() throws RemoteException {
    DSTaskInfo dsTaskInfo = new DSTaskInfo();
    String[] taskNames = dssTaskClient.getAllTaskNames();

    if (taskNames != null) {
        for (String task : taskNames) {
            if (scheduleTaskName.equals(task)) {
                dssTaskClient.deleteTask(scheduleTaskName);
                log.info(scheduleTaskName + " already exists. scheduleTask deleted");
                try {
                    Thread.sleep(10000);
                } catch (InterruptedException e) {
                    log.error("InterruptedException :", e);
                    Assert.fail("InterruptedException :" + e);
                }
                break;
            }
        }
    }

    dsTaskInfo.setName(scheduleTaskName);
    dsTaskInfo.setServiceName(serviceName);
    dsTaskInfo.setOperationName("incrementEmployeeSalary");
    dsTaskInfo.setTaskInterval(taskInterval);
    dsTaskInfo.setTaskCount(4);

    dssTaskClient.scheduleTask(dsTaskInfo);
    log.info("Task Scheduled");
    try {
        Thread.sleep(1000);
    } catch (InterruptedException ignore) {

    }

}
 
开发者ID:wso2,项目名称:product-ei,代码行数:37,代码来源:AddScheduleTaskTestCase.java

示例3: addScheduleTask

import org.wso2.carbon.dataservices.task.ui.stub.xsd.DSTaskInfo; //导入方法依赖的package包/类
@Test(groups = "wso2.dss", dependsOnMethods = {"serviceInvocation"})
public void addScheduleTask() throws RemoteException {
    DSTaskInfo dsTaskInfo = new DSTaskInfo();
    String[] taskNames = dssTaskClient.getAllTaskNames();

    if (taskNames != null) {
        for (String task : taskNames) {
            if (scheduleTaskName.equals(task)) {
                dssTaskClient.deleteTask(scheduleTaskName);
                log.info(scheduleTaskName + " already exists. scheduleTask deleted");
                try {
                    Thread.sleep(10000);
                } catch (InterruptedException e) {
                    log.error("InterruptedException :", e);
                    Assert.fail("InterruptedException :" + e);
                }
                break;
            }
        }
    }

    dsTaskInfo.setName(scheduleTaskName);
    dsTaskInfo.setServiceName(serviceName);
    dsTaskInfo.setOperationName("incrementEmployeeSalary");
    dsTaskInfo.setTaskInterval(taskInterval);
    dsTaskInfo.setTaskCount(9);

    dssTaskClient.scheduleTask(dsTaskInfo);
    log.info("Task Scheduled");
    try {
        Thread.sleep(1000);
    } catch (InterruptedException ignore) {

    }

}
 
开发者ID:wso2-attic,项目名称:product-dss,代码行数:37,代码来源:AddScheduleTaskTestCase.java


注:本文中的org.wso2.carbon.dataservices.task.ui.stub.xsd.DSTaskInfo.setOperationName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。