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

## org.jini.rio.core
Class Schedule

    java.lang.Object
      org.jini.rio.core.Schedule

All Implemented Interfaces:
  Serializable

    public class Schedule

extends Object
implements Serializable

The Schedule provides a way to define the scheduling for an activity, allowing the capability to specify a time in the future when a specific activity when take place, and how long that activity should remain active.

See Also:
  Serialized Form

Field Summary
`static long` | `INDEFINITE` Constant indicating the activity has an indefinite duration or repeat count
`static long` | `MINIMUM_REPEAT_INTERVAL` Constant indicating the minimum repeatInterval, 5 seconds

Constructor Summary
`Schedule()` Create a Schedule with no configured attributes
`Schedule(int month, int dayOfMonth, int hour, int minute, long duration, long repeatCount, long repeatInterval)` Create a Schedule to start on a specific month, day, hour and minute in the future
`Schedule(int dayOfWeek, int hour, int minute, long duration, long repeatCount, long repeatInterval)` Create a Schedule on a specific day, hour and minute in the future
`Schedule(int hour, int minute, long duration, long repeatCount, long repeatInterval)` Create a Schedule to start on a specific hour and minute in the future
`Schedule(int minute, long duration, long repeatCount, long repeatInterval)` Create a Schedule to start at a specific minute in the future
`Schedule(long duration, long repeatCount, long repeatInterval)` Create a Schedule to start immediately

Method Summary
`boolean` | `equals(Object obj)`
`long` | `getDuration()` Get the duration property
`long` | `getRepeatCount()` Get the repeatCount property
`long` | `getRepeatInterval()` Get the repeatInterval property
`Date` | `getStartDate()` Get the startDate.
`int` | `hashCode()`
`static void` | `main(String[] args)`
`String` | `toString()`

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

Field Detail

### INDEFINITE

    public static final long INDEFINITE

  Constant indicating the activity has an indefinite duration or repeat count

  See Also:
    Constant Field Values

### MINIMUM_REPEAT_INTERVAL

    public static final long MINIMUM_REPEAT_INTERVAL

  Constant indicating the minimum repeatInterval, 5 seconds

  See Also:
    Constant Field Values

Constructor Detail

### Schedule

    public Schedule()

  Create a Schedule with no configured attributes

### Schedule

    public Schedule(long duration,
                    long repeatCount,
                    long repeatInterval)

  Create a Schedule to start immediately

  Parameters:
    `duration` - How long (in milliseconds) the activity being scheduled will remain active. If the intent is to keep the scheduled activity active for an indeterminate time, use INDEFINITE
    `repeatCount` - The number of times the activity should repeat. Use INDEFINTE if it should repeat forever. If this value is >0, the duration value must not be INDEFINITE
    `repeatInterval` - The time (in milliseconds) between executions. Only meaningful if repeatCount is >0

### Schedule

    public Schedule(int minute,
                    long duration,
                    long repeatCount,
                    long repeatInterval)

  Create a Schedule to start at a specific minute in the future

  Parameters:
    `minute` - The minute of the hour to schedule an activity. If the minute has already passed, then the Calendar will be rolled forward to the next hour
    `duration` - How long (in milliseconds) the planned activity shall be active. If the keep the scheduled activity active for an indeterminate time, use INDEFINITE
    `repeatCount` - The number of times the activity should repeat. Use INDEFINTE if it should repeat forever. If this value is >0, the duration value must not be INDEFINITE
    `repeatInterval` - The time (in milliseconds) between executions. Only meaningful if repeatCount is >0

### Schedule

    public Schedule(int hour,
                    int minute,
                    long duration,
                    long repeatCount,
                    long repeatInterval)

  Create a Schedule to start on a specific hour and minute in the future

  Parameters:
    `hour` - The hour of the day, in 24 hour format to schedule an activity. If the hour has already passed, then the Calendar will be rolled forward to the next day
    `minute` - The minute of the hour to schedule an activity. If the minute has already passed, then the Calendar will be rolled forward to the next hour
    `duration` - How long (in milliseconds) the planned activity shall be active. If the keep the scheduled activity active for an indeterminate time, use INDEFINITE
    `repeatCount` - The number of times the activity should repeat. Use INDEFINTE if it should repeat forever. If this value is >0, the duration value must not be INDEFINITE
    `repeatInterval` - The time (in milliseconds) between executions. Only meaningful if repeatCount is >0

### Schedule

    public Schedule(int dayOfWeek,
                    int hour,
                    int minute,
                    long duration,
                    long repeatCount,
                    long repeatInterval)

  Create a Schedule on a specific day, hour and minute in the future

  Parameters:
    `dayOfWeek` - The day of the week to schedule an activity. The value must be either Calendar.SUNDAY, Calendar.MONDAY, Calendar.TUESDAY, Calendar.WEDNESDAY, Calendar.THURSDAY, Calendar.FRIDAY or Calendar.SATURDAY then the day of the week will be set to the current day. If the day has already past, then the Calendar will be rolled forward one week
    `hour` - The hour of the day, in 24 hour format to schedule an activity. If the hour has already passed, then the Calendar will be rolled forward to the next day
    `minute` - The minute of the hour to schedule an activity. If the minute has already passed, then the Calendar will be rolled forward to the next hour
    `duration` - How long (in milliseconds) the planned activity shall be active. If the keep the scheduled activity active for an indeterminate time, use INDEFINITE
    `repeatCount` - The number of times the activity should repeat. Use INDEFINTE if it should repeat forever. If this value is >0, the duration value must not be INDEFINITE
    `repeatInterval` - The time (in milliseconds) between executions. Only meaningful if repeatCount is >0

### Schedule

    public Schedule(int month,
                    int dayOfMonth,
                    int hour,
                    int minute,
                    long duration,
                    long repeatCount,
                    long repeatInterval)

  Create a Schedule to start on a specific month, day, hour and minute in the future

  Parameters:
    `month` - The month to schedule an activity. The value must be either Calendar.JANUARY, Calendar.FEBRUARY, Calendar.MARCH, Calendar.APRIL, Calendar.MAY, Calendar.JUNE, Calendar.JULY, Calendar.AUGUST, Calendar.SEPTEMBER, Calendar.OCTOBER, Calendar.NOVEMBER, Calendar.DECEMBER
    `dayOfMonth` - The day of the month
    `hour` - The hour of the day, in 24 hour format to schedule an activity. If the hour has already passed, then the Calendar will be rolled forward to the next day
    `minute` - The minute of the hour to schedule an activity. If the minute has already passed, then the Calendar will be rolled forward to the next hour
    `duration` - How long (in milliseconds) the planned activity shall be active. If the keep the scheduled activity active for an indeterminate time, use INDEFINITE
    `repeatCount` - The number of times the activity should repeat. Use INDEFINTE if it should repeat forever. If this value is >0, the duration value must not be INDEFINITE
    `repeatInterval` - The time (in milliseconds) between executions. Only meaningful if repeatCount is >0

Method Detail

### getStartDate

    public Date getStartDate()

  Get the startDate. This value is computed each time this method is invoked. The value returned is a time in the future based on a requested day of week, hour and minute using a GregorianCalendar with it's date and time set for the default time zone with the default locale If the day of week has already passed, then the GregorianCalendar is rolled forward one day, having the calculated hour and minute be the hour and minute of the next day

  Returns:
    The Date to start the activity. This value is computed each time this method is invoked.

### getDuration

    public long getDuration()

  Get the duration property

  Returns:
    How long (in milliseconds) the activity shall be active

### getRepeatCount

    public long getRepeatCount()

  Get the repeatCount property

  Returns:
    The number of times the activity should repeat.

### getRepeatInterval

    public long getRepeatInterval()

  Get the repeatInterval property

  Returns:
    The time (in milliseconds) in between executions. Only meaningful if repeatCount is >0

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### main

    public static void main(String[] args)

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

Copyright © Project Rio.