public interface TimeJob
extends org.quartz.Job
| Modifier and Type | Method and Description |
|---|---|
default void |
execute(org.quartz.JobExecutionContext context)
仅用于获取定时任务参数
|
void |
execute(MsgSender msgSender,
CQCodeUtil cqCodeUtil)
同名方法,获取并注入两个定时任务参数
|
default Beans |
getBeans()
获取Beans注解,当返回值不为null的时候会进行注入
|
static <T extends TimeJob> |
getDepend(String beanName,
Class<T> type,
Beans beans,
DependCenter center)
提供一个对象,他的@Beans注解对象以及依赖工厂,则如果可以,则。
为了考虑可能存在的优化方案,仅有当参数@Beans注解对象为null的时候才会通过反射去获取注解。
|
void execute(MsgSender msgSender, CQCodeUtil cqCodeUtil)
default void execute(org.quartz.JobExecutionContext context)
execute in interface org.quartz.Jobdefault Beans getBeans()
static <T extends TimeJob> Depend<T> getDepend(String beanName, Class<T> type, Beans beans, DependCenter center)
beanName - 定时任务对象依赖名称type - 定时任务类型, 不可为nullbeans - @Beans注解对象center - 依赖工厂,如果为null则方法失效Copyright © 2020. All rights reserved.