本文整理汇总了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) {
}
}
示例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) {
}
}
示例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) {
}
}