public class TaskListenerManager extends Object implements Serializable
Constructor and Description |
---|
TaskListenerManager() |
Modifier and Type | Method and Description |
---|---|
TaskListenerManager |
addListener(TaskListener listener)
增加监听器
|
void |
notifyTaskFailed(TaskExecutor executor,
Throwable exception)
通知所有监听任务启动器结束并失败
无监听将打印堆栈到命令行 |
void |
notifyTaskStart(TaskExecutor executor)
通知所有监听任务启动器启动
|
void |
notifyTaskSucceeded(TaskExecutor executor)
通知所有监听任务启动器成功结束
|
TaskListenerManager |
removeListener(TaskListener listener)
移除监听器
|
public TaskListenerManager addListener(TaskListener listener)
listener
- TaskListener
public TaskListenerManager removeListener(TaskListener listener)
listener
- TaskListener
public void notifyTaskStart(TaskExecutor executor)
executor
- TaskExecutor
public void notifyTaskSucceeded(TaskExecutor executor)
executor
- TaskExecutor
public void notifyTaskFailed(TaskExecutor executor, Throwable exception)
executor
- TaskExecutor
exception
- 失败原因Copyright © 2021. All rights reserved.