Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## schedule
Class Task

    java.lang.Object
      schedule.Task

All Implemented Interfaces:
  java.lang.Runnable, ISchedulable, ITask

    public class Task

extends java.lang.Object
implements ITask

This class contains method necessary for scheduling and executing various tasks. Class contains time iterator which is used to determine time at which run() method of other stored object is invoked.

Field Summary

Fields inherited from interface schedule.ISchedulable
`ANYTIME`

Constructor Summary
`Task(java.lang.Runnable task, int dayOfMonth, int dayOfWeek, int hour, int minute)` Constructor takes instance of runnable class and parameters that specify time at which class should be run.

Method Summary
`boolean` | `accepts(java.util.Date date)` Checks whether task should run at specified time.
`java.util.Date` | `nextDue()` Returns next time in future, when task is expected to be run.
`void` | `run()` Starts runnable class.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Task

    public Task(java.lang.Runnable task,
                int dayOfMonth,
                int dayOfWeek,
                int hour,
                int minute)

  Constructor takes instance of runnable class and parameters that specify time at which class should be run.

  Parameters:
    `task` - instance of Runnable interface
    `dayOfMonth` - number of day of month or wildcard
    `dayOfWeek` - number of day of week or wildcard
    `hour` - hour of execution
    `minute` - minute of execution
  See Also:
    `ISchedulable`, `TaskTime`

Method Detail

### run

    public void run()

  Starts runnable class.

  Specified by:
    `run` in interface `java.lang.Runnable`

### nextDue

    public java.util.Date nextDue()

  Description copied from interface: `ISchedulable`
  Returns next time in future, when task is expected to be run.

  Specified by:
    `nextDue` in interface `ISchedulable`
  Returns:
    Date object representing time, when task should be run.

### accepts

    public boolean accepts(java.util.Date date)

  Description copied from interface: `ISchedulable`
  Checks whether task should run at specified time. This function should accept time generated by nextDue() function.

  Specified by:
    `accepts` in interface `ISchedulable`
  Parameters:
    `date` - exact date
  Returns:
    true if and only if task can be scheduled at specified date

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD