在Quatz中排定Job对象之后

时间:2019-01-07 16:13:38

标签: java quartz-scheduler

我实现了

之类的类
public class GreetingJob implements Job{

     private Greeting salut;

     public GreetingJob(Greeting salut){
          this.salut = salut;
     }

     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
           System.out.println(salut);       
     }

  }

使用类模型

public class Greeting {

    private String name;
    private String greeting;

    public Greeting(String name, String greeting) {
        this.name = name;
        this.greeting = greeting;
    }

    public String getName() {
         return name;
    }

    public void setName(String name) {
         this.name = name;
    }

    public String getGreeting() {
         return greeting;
    }

    public void setGreeting(String greeting) {
         this.greeting = greeting;
    }

    @Override
    public String toString() {
         return "Salut [name=" + name + ", greeting=" + greeting + "]";
    }
}

如何在派生类似于石英类型的对象之后进行调度?

0 个答案:

没有答案