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

## com.sun.management.oss.pm.util
Interface DailySchedule

All Superinterfaces:
  java.lang.Cloneable, java.io.Serializable

All Known Implementing Classes:
  DailyScheduleImpl

public interface DailySchedule
extends java.io.Serializable, java.lang.Cloneable

The daily schedule specifies the time periods during the day when the schedule is active.

The hour schedule consist of two arrays of start times and end times, which defines the intervals when the schedule shall be active. The start time and end time lie between 00.00 and 24.00 hours.

Version:
  0.9, 2001-10-25
Author:
  Stefan Aberg

Method Summary
`java.lang.Object` | `clone()` Deep copy of this instance.
`java.util.Calendar[]` | `getStartTimes()` Returns the start times when the daily schedule shall be active.
`java.util.Calendar[]` | `getStopTimes()` Returns the stop times when the daily schedule shall not be active.
`boolean` | `isActive()` Checks if the schedule is active or not.
`void` | `setStartTimes(java.util.Calendar[] startTimes)` Sets the start times when the daily schedule shall be active.
`void` | `setStopTimes(java.util.Calendar[] stopTimes)` Sets the stop times when the daily schedule shall not be active.

Method Detail

### clone

    public java.lang.Object clone()

  Deep copy of this instance.

  Returns:
    Object copy of this instance.

### isActive

    public boolean isActive()

  Checks if the schedule is active or not.

  If the current time is within the defined schedule this method will return true. If the current time is outside the schedule false will be returned.

  The check will use the following fields in the Calendar:
  - `Calendar.HOUR_OF_DAY`,
  - `Calendar.MINUTE`,
  - `Calendar.SECOND`
  and the time zone. Other fields will be ignored.

  Returns:
    boolean Returns true if the schedule is active, else false.

### getStartTimes

    public java.util.Calendar[] getStartTimes()

  Returns the start times when the daily schedule shall be active.

  If no start times has been set an empty arry is returned.

  Returns:
    java.util.Calendar[] Array of start times the daily schedule shall be active.
  See Also:
    `setStartTimes(java.util.Calendar[])`

### setStartTimes

    public void setStartTimes(java.util.Calendar[] startTimes)

  Sets the start times when the daily schedule shall be active.

  Parameters:
    `startTimes` - Array of start times which defines when the daily schedule shall be active.
  See Also:
    `getStartTimes()`

### getStopTimes

    public java.util.Calendar[] getStopTimes()

  Returns the stop times when the daily schedule shall not be active.

  If no stop times has been set an empty arry is returned.

  Returns:
    java.util.Calendar[] Array of stop times the daily schedule shall not be active.
  See Also:
    `setStopTimes(java.util.Calendar[])`

### setStopTimes

    public void setStopTimes(java.util.Calendar[] stopTimes)

  Sets the stop times when the daily schedule shall not be active.

  Parameters:
    `stopTimes` - Array of stop times which defines when the daily schedule shall not be active.
  See Also:
    `getStopTimes()`

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