Package org.apache.synapse.task
Interface TaskManager
public interface TaskManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new Observer to the list of observers of this task manager.booleangetName()getProperty(String name) intString[]booleaninit(Properties properties) booleanbooleanisTaskBlocked(String taskName) Checks whether theTaskwith the given name is blocked without giving the control back to the schedular.booleanisTaskDeactivated(String taskName) Checks whether theTaskwith the given name is deactivated.booleanisTaskExist(String taskName) Checks whether theTaskwith the given name exists.booleanisTaskRunning(Object taskKey) booleanisTaskRunning(String taskName) Checks whether theTaskwith the given name is running.booleanbooleanpauseAll()booleanreschedule(String name, TaskDescription taskDescription) booleanbooleanbooleanschedule(TaskDescription taskDescription) Schedules a task on an external task scheduler based on the parameters of the TaskDescription.voidsendClusterMessage(Callable<Void> task) Sends a cluster message, with the givenCallabletask in this cluster.voidsetConfigurationProperties(Properties properties) voidbooleansetProperties(Map<String, Object> properties) booleansetProperty(String name, Object property) booleanstart()booleanstop()
-
Method Details
-
schedule
Schedules a task on an external task scheduler based on the parameters of the TaskDescription.- Parameters:
taskDescription- Contains parameters for the task scheduler. eg. target type, url, trigger parameters etc.- Returns:
- true if the scheduling is successful, false otherwise.
-
reschedule
-
delete
-
pause
-
pauseAll
boolean pauseAll() -
resume
-
resumeAll
boolean resumeAll() -
getTask
-
getTaskNames
String[] getTaskNames() -
init
-
isInitialized
boolean isInitialized() -
start
boolean start() -
stop
boolean stop() -
getRunningTaskCount
int getRunningTaskCount() -
isTaskRunning
-
setProperties
-
setProperty
-
getProperty
-
setName
-
getName
String getName() -
getProviderClass
String getProviderClass() -
getConfigurationProperties
Properties getConfigurationProperties() -
setConfigurationProperties
-
addObserver
Adds a new Observer to the list of observers of this task manager.- Parameters:
o- New Observer to be registered or subscribed.
-
isTaskDeactivated
Checks whether theTaskwith the given name is deactivated.- Parameters:
taskName- name of the Task- Returns:
trueif the task is deactivated,falseotherwise
-
isTaskBlocked
Checks whether theTaskwith the given name is blocked without giving the control back to the schedular.- Parameters:
taskName- name of the Task- Returns:
trueif the task is blocked,falseotherwise.
-
isTaskRunning
Checks whether theTaskwith the given name is running.- Parameters:
taskName- name of the Task- Returns:
trueif the task is running,falseotherwise.
-
sendClusterMessage
Sends a cluster message, with the givenCallabletask in this cluster. The givenCallabletask is executed by all the nodes in the cluster- Parameters:
task-Callabletask to be executed by members in the cluster.
-
isTaskExist
Checks whether theTaskwith the given name exists.- Parameters:
taskName- name of the Task- Returns:
trueif the task exists,falseotherwise.
-