public interface TaskManager
Modifier and Type | Interface and Description |
---|---|
static class |
TaskManager.TaskState
Task states.
|
Modifier and Type | Method and Description |
---|---|
boolean |
deleteTask(String taskName)
Stops and deletes a task with the given name.
|
List<TaskInfo> |
getAllTasks()
Get all task information.
|
TaskInfo |
getTask(String taskName)
Get task information.
|
TaskManager.TaskState |
getTaskState(String taskName)
Gets tasks state information
|
void |
initStartupTasks()
Initialize the startup tasks.
|
boolean |
isTaskScheduled(String taskName)
Checks if the given task is already scheduled.
|
void |
pauseTask(String taskName)
Pauses a task with the given name.
|
void |
registerLocalTaskActionListener(LocalTaskActionListener listener,
String taskName)
Registers a listener to be notified when an action is performed on a task.
|
void |
registerTask(TaskInfo taskInfo)
Registers a new task or updates if one already exists.
|
void |
rescheduleTask(String taskName)
Reschedules a task with the given name, only the trigger information will be updated in the
reschedule.
|
void |
resumeTask(String taskName)
Resumes a paused task with the given name.
|
void |
scheduleTask(String taskName)
Starts a task with the given name.
|
void initStartupTasks() throws org.wso2.carbon.ntask.common.TaskException
org.wso2.carbon.ntask.common.TaskException
void scheduleTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
void rescheduleTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The task to be rescheduledorg.wso2.carbon.ntask.common.TaskException
boolean deleteTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
void pauseTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
void resumeTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
void registerTask(TaskInfo taskInfo) throws org.wso2.carbon.ntask.common.TaskException
taskInfo
- The task informationorg.wso2.carbon.ntask.common.TaskException
TaskManager.TaskState getTaskState(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
TaskInfo getTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
- if the task cannot be foundList<TaskInfo> getAllTasks() throws org.wso2.carbon.ntask.common.TaskException
org.wso2.carbon.ntask.common.TaskException
boolean isTaskScheduled(String taskName) throws org.wso2.carbon.ntask.common.TaskException
taskName
- The task nameorg.wso2.carbon.ntask.common.TaskException
void registerLocalTaskActionListener(LocalTaskActionListener listener, String taskName)
listener
- the listener to be notifiedtaskName
- the name of the task for which the listener should be registeredCopyright © 2020 WSO2. All rights reserved.