public class RunnableTask extends Object implements Task
Runnable
Task
RunnableTask(Runnable runnable)
void
execute()
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public RunnableTask(Runnable runnable)
public void execute()
作业的具体实现需考虑异常情况,默认情况下任务异常在监听中统一监听处理,如果不加入监听,异常会被忽略 因此最好自行捕获异常后处理
execute
Copyright © 2024. All rights reserved.