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.impl.pm.util
Class ScheduleImpl

    java.lang.Object
      com.sun.management.oss.impl.pm.util.ScheduleImpl

All Implemented Interfaces:
  java.lang.Cloneable, Schedule, java.io.Serializable

public class ScheduleImpl
extends java.lang.Object
implements Schedule

Title: JSR090 Reference Implementation Description: Copyright: Copyright 2001 Ericsson Radio Systems AB Company: Ericsson

Version:
  0.2
Author:
  Andreas Jirven, Anna Eriksson, Ali Feizabadi
See Also:
  Serialized Form

Constructor Summary
`ScheduleImpl()`

Method Summary
`java.lang.Object` | `clone()` Deep copy of this instance.
`DailySchedule` | `getDailySchedule()` Gets the daily schedule of the schedule.
`java.util.Calendar` | `getStartTime()` Returns the start time.
`java.util.Calendar` | `getStopTime()` Returns the stop time of the schedule.
`WeeklySchedule` | `getWeeklySchedule()` Gets the weekly schedule of the schedule.
`boolean` | `isActive()` Checks if the schedule is active or not.
`DailySchedule` | `makeDailySchedule()` Creates a new instance of the DailySchedule interface.
`WeeklySchedule` | `makeWeeklySchedule()` Creates a new instance of the WeeklySchedule interface.
`void` | `setDailySchedule(DailySchedule daily)` Sets the daily schedule of the schedule.
`void` | `setStartTime(java.util.Calendar start)` Sets the start time of the schedule.
`void` | `setStopTime(java.util.Calendar stop)` Sets the stop time of the schedule.
`void` | `setWeeklySchedule(WeeklySchedule week)` Sets the weekly schedule of the schedule.

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

Constructor Detail

### ScheduleImpl

    public ScheduleImpl()

Method Detail

### clone

    public java.lang.Object clone()

  Description copied from interface: `Schedule`
  Deep copy of this instance.

  Specified by:
    `clone` in interface `Schedule`

### makeWeeklySchedule

    public WeeklySchedule makeWeeklySchedule()

  Creates a new instance of the WeeklySchedule interface.

  Specified by:
    `makeWeeklySchedule` in interface `Schedule`
  Returns:
    WeeklySchedule The created object. The object is empty.

### makeDailySchedule

    public DailySchedule makeDailySchedule()

  Creates a new instance of the DailySchedule interface.

  Specified by:
    `makeDailySchedule` in interface `Schedule`
  Returns:
    DailySchedule The created object. The object is empty.

### isActive

    public boolean isActive()

  Checks if the schedule is active or not.

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

  Specified by:
    `isActive` in interface `Schedule`
  Returns:
    boolean Returns true if the schedule is active, else false.

### getStartTime

    public java.util.Calendar getStartTime()

  Returns the start time.

  Specified by:
    `getStartTime` in interface `Schedule`
  Returns:
    Date Start time of the schedule or null if the start time is not set.
  See Also:
    `Schedule.setStartTime(java.util.Calendar)`

### setStartTime

    public void setStartTime(java.util.Calendar start)

  Sets the start time of the schedule.

  The start time specifies when the schedule shall start to be active. If no start time is provided, the schedule is active immediately.

  If start time is null the start time will be cleared.

  Specified by:
    `setStartTime` in interface `Schedule`
  Parameters:
    `start` - Start time of the schedule.
  See Also:
    `Schedule.getStartTime()`

### getStopTime

    public java.util.Calendar getStopTime()

  Returns the stop time of the schedule.

  Specified by:
    `getStopTime` in interface `Schedule`
  Returns:
    Date Stop time of the schedule or null if the stop time is not set.
  See Also:
    `Schedule.setStopTime(java.util.Calendar)`

### setStopTime

    public void setStopTime(java.util.Calendar stop)

  Sets the stop time of the schedule.

  The stop time specifies when the schedule shall stop. The schedule will remain active until the stop time - if set - is reached. If no stop time is specified the schedule will be active indefinitely.

  If stop time is null the stop time will be cleared.

  Specified by:
    `setStopTime` in interface `Schedule`
  Parameters:
    `stop` - Stop time of the measurement job.
  See Also:
    `Schedule.getStopTime()`

### getWeeklySchedule

    public WeeklySchedule getWeeklySchedule()

  Gets the weekly schedule of the schedule.

  Specified by:
    `getWeeklySchedule` in interface `Schedule`
  Returns:
    WeeklySchedule The weekly schedule of the schedule or null if weekly schedule is not set.
  See Also:
    `Schedule.setWeeklySchedule(com.sun.management.oss.pm.util.WeeklySchedule)`

### setWeeklySchedule

    public void setWeeklySchedule(WeeklySchedule week)

  Sets the weekly schedule of the schedule.

  The weekly schedule specifies which day of the week the schedule will be active. If weekly schedule is omitted the schedule will run all days of the week.

  If weekly schedule is null the weekly schedule will be cleared.

  Specified by:
    `setWeeklySchedule` in interface `Schedule`
  Parameters:
    `week` - The weekly schedule of the schedule.
  See Also:
    `Schedule.getWeeklySchedule()`

### getDailySchedule

    public DailySchedule getDailySchedule()

  Gets the daily schedule of the schedule.

  Specified by:
    `getDailySchedule` in interface `Schedule`
  Returns:
    DailySchedule The daily schedule of the schedule or null if daily schedule is not set.
  See Also:
    `Schedule.setDailySchedule(com.sun.management.oss.pm.util.DailySchedule)`

### setDailySchedule

    public void setDailySchedule(DailySchedule daily)

  Sets the daily schedule of the schedule.

  The daily schedule specifies the time frames during the day that the schedule will be active. If daily schedule is omitted, the schedule will run continuously through the day.

  If daily schedule is null the daily schedule will be cleared.

  Specified by:
    `setDailySchedule` in interface `Schedule`
  Parameters:
    `daily` - The daily schedule of the schedule.
  See Also:
    `Schedule.getDailySchedule()`

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