@Component public class TaskManager extends Object implements IEmapComponent, IEmapAppListener, org.springframework.beans.factory.InitializingBean, Runnable
IEmapAppListener.Type| 构造器和说明 |
|---|
TaskManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
action(IEmapApp app,
IEmapAppListener.Type type)
当应用发生的某个动作时会调用此方法。
|
void |
afterPropertiesSet() |
void |
destroy()
销毁, 此方法会在spring销毁前被执行.
|
static TaskManager |
getInstance()
获取调度任务管理者的实例。
|
void |
init()
初始化, 此方法会在spring初始化完后被执行.
|
static boolean |
removeTask(String springName,
Class<?> type,
String method,
boolean cluster)
移除一个任务。
|
static void |
resetTask(String springName,
Object task,
String method)
重设一个任务的调度时间。
|
void |
run() |
public static void resetTask(String springName, Object task, String method)
springName - 任务对象在spring中的注册名称task - 任务对象method - 执行任务的方法名public static boolean removeTask(String springName, Class<?> type, String method, boolean cluster)
springName - 任务对象在spring中的注册名称type - 任务方法所在的类method - 执行任务的方法名cluster - 任务是否为集群模式public void action(IEmapApp app, IEmapAppListener.Type type) throws org.quartz.SchedulerException
IEmapAppListeneraction 在接口中 IEmapAppListenerapp - 发生动作的应用type - 动作的类型org.quartz.SchedulerExceptionpublic static TaskManager getInstance()
public void afterPropertiesSet()
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanpublic void init()
IEmapComponentinit 在接口中 IEmapComponentpublic void destroy()
IEmapComponentdestroy 在接口中 IEmapComponentCopyright © 2022. All rights reserved.