com.github.lontime.extspring.components.QuartzComponentExt Maven / Gradle / Ivy
package com.github.lontime.extspring.components;
import java.util.stream.Collectors;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import com.github.lontime.base.commonj.components.ComponentInterfaceHelper;
import com.github.lontime.extquartz.JobInterface;
import com.github.lontime.extquartz.QuartzInstance;
/**
* QuartzComponentExt.
* @author lontime
* @since 1.0
*/
public class QuartzComponentExt implements InitializingBean {
private ObjectProvider jobInterfaces;
@Autowired
public void setJobInterfaces(ObjectProvider interfaces) {
this.jobInterfaces = interfaces;
}
@Override
public void afterPropertiesSet() {
ComponentInterfaceHelper.register(jobInterfaces.stream()
.filter(s -> s.getClazz() == JobInterface.class).collect(Collectors.toList()));
QuartzInstance.get();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy