org.qi4j.library.scheduler
Class SchedulerMixin

java.lang.Object
  extended by org.qi4j.library.scheduler.SchedulerMixin
All Implemented Interfaces:
Scheduler

public class SchedulerMixin
extends Object
implements Scheduler


Constructor Summary
SchedulerMixin()
           
 
Method Summary
 Schedule schedule(Task task, String cronExpression)
          Schedule a Task using a CronExpression.
 Schedule schedule(Task task, String cronExpression, Date start)
          Schedule a Task using a CronExpression starting at a given date.
 Schedule schedule(Task task, String cronExpression, long initialDelay)
          Schedule a Task using a CronExpression with a given initial delay in milliseconds.
 Schedule scheduleOnce(Task task, int initialSecondsDelay)
          Schedule a Task to be run after a given initial delay in seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchedulerMixin

public SchedulerMixin()
Method Detail

scheduleOnce

public Schedule scheduleOnce(Task task,
                             int initialSecondsDelay)
Description copied from interface: Scheduler
Schedule a Task to be run after a given initial delay in seconds.

Specified by:
scheduleOnce in interface Scheduler
Parameters:
task - Task to be scheduled once
initialSecondsDelay - Initial delay the Task will be run after, in seconds
Returns:
The newly created Schedule

schedule

public Schedule schedule(Task task,
                         String cronExpression)
Description copied from interface: Scheduler
Schedule a Task using a CronExpression.

Specified by:
schedule in interface Scheduler
Parameters:
task - Task to be scheduled once
cronExpression - CronExpression for creating the Schedule for the given Task
Returns:
The newly created Schedule

schedule

public Schedule schedule(Task task,
                         String cronExpression,
                         long initialDelay)
Description copied from interface: Scheduler
Schedule a Task using a CronExpression with a given initial delay in milliseconds.

Specified by:
schedule in interface Scheduler
Parameters:
task - Task to be scheduled once
cronExpression - CronExpression for creating the Schedule for the given Task
initialDelay - Initial delay the Schedule will be active after, in milliseconds
Returns:
The newly created Schedule

schedule

public Schedule schedule(Task task,
                         String cronExpression,
                         Date start)
Description copied from interface: Scheduler
Schedule a Task using a CronExpression starting at a given date.

Specified by:
schedule in interface Scheduler
Parameters:
task - Task to be scheduled once
cronExpression - CronExpression for creating the Schedule for the given Task
start - Date from which the Schedule will become active
Returns:
The newly created Schedule