org.rhq.core.domain.common
Class JobTrigger

java.lang.Object
  extended by org.rhq.core.domain.common.JobTrigger
All Implemented Interfaces:
Serializable

public class JobTrigger
extends Object
implements Serializable

Indicates when a particular job (e.g. invocation of an RHQ Agent plugin operation) should execute. Note, all constructors of this class are private - the create*Trigger() static factory methods must be used to create instances.

See Also:
Serialized Form

Nested Class Summary
static class JobTrigger.EndType
           
static class JobTrigger.RecurrenceType
           
static class JobTrigger.StartType
           
 
Method Summary
static JobTrigger createCronTrigger(String cronExpression)
          Create a trigger that will run on the schedule specified by a cron expression.
static JobTrigger createLaterAndRepeatTrigger(Date startDate, long repeatInterval)
          Create a trigger that will run at specified date/time and then repeat on interval indefinitely.
static JobTrigger createLaterAndRepeatTrigger(Date startDate, long repeatInterval, Date endDate)
          Create a trigger that will run at specified date/time and then repeat on interval until end date/time.
static JobTrigger createLaterAndRepeatTrigger(Date startDate, long repeatInterval, int repeatCount)
          Create a trigger that will run at specified date/time and then repeat on interval n times.
static JobTrigger createLaterTrigger(Date startDate)
          Create a trigger that will run at specified date/time, once.
static JobTrigger createNowAndRepeatTrigger(long repeatInterval)
          Create a trigger that will run now and repeat on interval indefinitely.
static JobTrigger createNowAndRepeatTrigger(long repeatInterval, Date endDate)
          Create a trigger that will run now and repeat on interval until end date/time.
static JobTrigger createNowAndRepeatTrigger(long repeatInterval, int repeatCount)
          Create a trigger that will run now and repeat on interval n times.
static JobTrigger createNowTrigger()
          Create a trigger that will run now, once.
 String getCronExpression()
           
 Date getEndDate()
           
 JobTrigger.EndType getEndType()
           
 JobTrigger.RecurrenceType getRecurrenceType()
           
 Integer getRepeatCount()
           
 Long getRepeatInterval()
           
 Date getStartDate()
           
 JobTrigger.StartType getStartType()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getStartType

public JobTrigger.StartType getStartType()

getEndType

public JobTrigger.EndType getEndType()

getRecurrenceType

public JobTrigger.RecurrenceType getRecurrenceType()

getStartDate

public Date getStartDate()

getRepeatInterval

public Long getRepeatInterval()

getCronExpression

public String getCronExpression()

getEndDate

public Date getEndDate()

getRepeatCount

public Integer getRepeatCount()

toString

public String toString()
Overrides:
toString in class Object

createNowTrigger

public static JobTrigger createNowTrigger()
Create a trigger that will run now, once.

Returns:
a trigger that will run now, once

createNowAndRepeatTrigger

public static JobTrigger createNowAndRepeatTrigger(long repeatInterval)
Create a trigger that will run now and repeat on interval indefinitely.

Returns:
a trigger that will run now and repeat on interval indefinitely

createNowAndRepeatTrigger

public static JobTrigger createNowAndRepeatTrigger(long repeatInterval,
                                                   Date endDate)
Create a trigger that will run now and repeat on interval until end date/time.

Returns:
a trigger that will run now and repeat on interval until end date/time

createNowAndRepeatTrigger

public static JobTrigger createNowAndRepeatTrigger(long repeatInterval,
                                                   int repeatCount)
Create a trigger that will run now and repeat on interval n times.

Returns:
a trigger that will run now and repeat on interval n times

createLaterTrigger

public static JobTrigger createLaterTrigger(Date startDate)
Create a trigger that will run at specified date/time, once.

Returns:
a trigger that will run at specified date/time, once

createLaterAndRepeatTrigger

public static JobTrigger createLaterAndRepeatTrigger(Date startDate,
                                                     long repeatInterval)
Create a trigger that will run at specified date/time and then repeat on interval indefinitely.

Returns:
a trigger that will run at specified date/time and then repeat on interval indefinitely

createLaterAndRepeatTrigger

public static JobTrigger createLaterAndRepeatTrigger(Date startDate,
                                                     long repeatInterval,
                                                     Date endDate)
Create a trigger that will run at specified date/time and then repeat on interval until end date/time.

Returns:
a trigger that will run at specified date/time and then repeat on interval until end date/time

createLaterAndRepeatTrigger

public static JobTrigger createLaterAndRepeatTrigger(Date startDate,
                                                     long repeatInterval,
                                                     int repeatCount)
Create a trigger that will run at specified date/time and then repeat on interval n times.

Returns:
a trigger that will run at specified date/time and then repeat on interval n times

createCronTrigger

public static JobTrigger createCronTrigger(String cronExpression)
Create a trigger that will run on the schedule specified by a cron expression. The expression must follow Quartz cron expression syntax, which is a bit different than Unix cron expression syntax.

Returns:
a trigger that will run on the schedule specified by a cron expression


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.