Last active
December 31, 2015 12:49
-
-
Save os890/7989006 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ApplicationScoped | |
public class SchedulerController | |
{ | |
@Inject | |
private Scheduler<Job> jobScheduler; | |
public void onPause(@Observes PauseJobEvent /*custom event*/ jobEvent) | |
{ | |
//using it with events is optional | |
this.jobScheduler.pauseJob(jobEvent.getJobClass()); | |
} | |
public void onResume(@Observes ResumeJobEvent /*custom event*/ jobEvent) | |
{ | |
//using it with events is optional | |
this.jobScheduler.resumeJob(jobEvent.getJobClass()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment