Class TriggerFactory

java.lang.Object
de.xima.fc.timing.TriggerFactory

public class TriggerFactory extends Object
Helper methods for creating quartz triggers.
Author:
XIMA MEDIA GmbH
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.quartz.Trigger
    getCronTrigger(org.quartz.TriggerKey triggerKey, org.quartz.CronExpression cronExpression, boolean ignoreMisfired)
     
    static org.quartz.Trigger
    getDateTrigger(org.quartz.TriggerKey triggerKey, Instant startInstant, boolean ignoreMisfired)
     
    static org.quartz.Trigger
    getDateTrigger(org.quartz.TriggerKey triggerKey, Date startDate, boolean ignoreMisfired)
     
    static org.quartz.Trigger
    getDelayTrigger(org.quartz.TriggerKey triggerKey, int delay, org.quartz.DateBuilder.IntervalUnit delayUnit, boolean ignoreMisfired)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TriggerFactory

      public TriggerFactory()
  • Method Details

    • getDateTrigger

      public static org.quartz.Trigger getDateTrigger(org.quartz.TriggerKey triggerKey, Date startDate, boolean ignoreMisfired)
      Parameters:
      triggerKey - TriggerKey to use for the trigger
      startDate - Date when the trigger should fire
      ignoreMisfired - true if misfired triggers should be ignored, false otherwise
      Returns:
      Trigger the created trigger
    • getDateTrigger

      public static org.quartz.Trigger getDateTrigger(org.quartz.TriggerKey triggerKey, Instant startInstant, boolean ignoreMisfired)
      Parameters:
      triggerKey - TriggerKey to use for the trigger
      startInstant - Instant when the trigger should fire
      ignoreMisfired - true if misfired triggers should be ignored, false otherwise
      Returns:
      Trigger the created trigger
    • getDelayTrigger

      public static org.quartz.Trigger getDelayTrigger(org.quartz.TriggerKey triggerKey, int delay, org.quartz.DateBuilder.IntervalUnit delayUnit, boolean ignoreMisfired)
      Parameters:
      triggerKey - TriggerKey to use for the trigger
      delay - Delay for the trigger when it should fire. The trigger fires after this amount of time relative to NOW.
      delayUnit - Unit of the given delay.
      ignoreMisfired - true if misfired triggers should be ignored, false otherwise
      Returns:
      The newly created trigger for the given delay.
    • getCronTrigger

      public static org.quartz.Trigger getCronTrigger(org.quartz.TriggerKey triggerKey, org.quartz.CronExpression cronExpression, boolean ignoreMisfired)
      Parameters:
      triggerKey - TriggerKey to use for the trigger
      cronExpression - Cron expression for when the trigger should fire.
      ignoreMisfired - true if misfired triggers should be ignored, false otherwise
      Returns:
      The newly created trigger for the given cron expression.