Author: pete.muir(a)jboss.org
Date: 2009-04-09 12:33:10 -0400 (Thu, 09 Apr 2009)
New Revision: 10374
Modified:
trunk/src/main/org/jboss/seam/async/QuartzTriggerHandle.java
Log:
add access to trigger
Modified: trunk/src/main/org/jboss/seam/async/QuartzTriggerHandle.java
===================================================================
--- trunk/src/main/org/jboss/seam/async/QuartzTriggerHandle.java 2009-04-09 13:28:38 UTC
(rev 10373)
+++ trunk/src/main/org/jboss/seam/async/QuartzTriggerHandle.java 2009-04-09 16:33:10 UTC
(rev 10374)
@@ -4,6 +4,7 @@
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
+import org.quartz.Trigger;
/**
* Provides control over the Quartz Job.
@@ -13,7 +14,7 @@
*/
public class QuartzTriggerHandle implements Serializable
{
- private String triggerName;
+ private final String triggerName;
// Hold a transient reference to the scheduler to allow control of the
// scheduler outside of Seam contexts (useful in a testing context)
@@ -34,6 +35,11 @@
getScheduler().pauseTrigger(triggerName, null);
}
+ public Trigger getTrigger() throws SchedulerException
+ {
+ return getScheduler().getTrigger(triggerName, null);
+ }
+
public void resume() throws SchedulerException
{
getScheduler().resumeTrigger(triggerName, null);