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.watch
Class PeriodicWatch

    java.lang.Object
      org.jini.rio.watch.Watch
          org.jini.rio.watch.ThresholdWatch
              org.jini.rio.watch.PeriodicWatch

All Implemented Interfaces:
  PeriodicWatchMBean, ThresholdWatchMBean, WatchMBean

Direct Known Subclasses:
  MeasurableCapability

    public abstract class PeriodicWatch

extends ThresholdWatch
implements PeriodicWatchMBean

A PeriodicWatch provides a mechanism to obtain information at preset intervals of time.

Field Summary
`static long` | `DEFAULT_PERIOD` Holds value of property period.

Fields inherited from class org.jini.rio.watch.Watch
`DEFAULT_VIEW, id, localRef, logger, watchDataSource`

Constructor Summary
`PeriodicWatch(String id)` Creates new Periodic Watch
`PeriodicWatch(String id, Archivable archivable, Configuration config)` Creates new PeriodicWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided
`PeriodicWatch(String id, Configuration config)` Creates new PeriodicWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided
`PeriodicWatch(WatchDataSource watchDataSource, String id)` Creates new PeriodicWatch

Method Summary
`long` | `getPeriod()` Getter for property period.
`void` | `setPeriod(long newPeriod)` Setter for property period.
`void` | `start()` Start the PeriodicWatch.
`void` | `stop()` Stop the PeriodicWatch

Methods inherited from class org.jini.rio.watch.ThresholdWatch
`addThresholdListener, addWatchRecord, getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, getThresholdManager, getThresholdValues, removeThresholdListener, setCurrentHighThreshold, setCurrentLowThreshold, setThresholdValues`

Methods inherited from class org.jini.rio.watch.Watch
`clear, equals, getCalculables, getId, getLastCalculableValue, getView, getWatchDataSource, hashCode, main, setView, setWatchDataSource, toString`

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

Methods inherited from interface org.jini.rio.watch.PeriodicWatchMBean
`checkValue`

Methods inherited from interface org.jini.rio.watch.ThresholdWatchMBean
`getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, setCurrentHighThreshold, setCurrentLowThreshold`

Methods inherited from interface org.jini.rio.watch.WatchMBean
`clear, getCalculables, getId, getLastCalculableValue`

Field Detail

### DEFAULT_PERIOD

    public static final long DEFAULT_PERIOD

  Holds value of property period.

  See Also:
    Constant Field Values

Constructor Detail

### PeriodicWatch

    public PeriodicWatch(String id)

  Creates new Periodic Watch

  Parameters:
    `id` - the identifier for this watch

### PeriodicWatch

    public PeriodicWatch(String id,
                         Configuration config)

  Creates new PeriodicWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided

  Parameters:
    `id` - The identifier for this watch
    `config` - Configuration object used for constructing a WatchDataSource

### PeriodicWatch

    public PeriodicWatch(String id,
                         Archivable archivable,
                         Configuration config)

  Creates new PeriodicWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided

  Parameters:
    `id` - The identifier for this watch
    `archivable` - The Archivable
    `config` - Configuration object used for constructing a WatchDataSource

### PeriodicWatch

    public PeriodicWatch(WatchDataSource watchDataSource,
                         String id)

  Creates new PeriodicWatch

  Parameters:
    `watchDataSource` - the watch data source associated with this watch
    `id` - the identifier for this watch

Method Detail

### start

    public void start()

  Description copied from interface: `PeriodicWatchMBean`
  Start the PeriodicWatch. The PeriodicWatch will be started using repeated fixed-delay executions, with the first invocation of `checkValue` ocurring at the time this method is invoked plus the time specified for the `property` value In fixed-delay execution, each execution is scheduled relative to the actual execution time of the previous execution. If an execution is delayed for any reason (such as garbage collection or other background activity), subsequent executions will be delayed as well. A new Timer will be created each time this method is called. If a Timer already exists, it will be cancelled.

  Specified by:
    `start` in interface `PeriodicWatchMBean`
  See Also:
    `PeriodicWatchMBean.start()`

### stop

    public void stop()

  Description copied from interface: `PeriodicWatchMBean`
  Stop the PeriodicWatch

  Specified by:
    `stop` in interface `PeriodicWatchMBean`
  See Also:
    `PeriodicWatchMBean.stop()`

### getPeriod

    public long getPeriod()

  Description copied from interface: `PeriodicWatchMBean`
  Getter for property period.

  Specified by:
    `getPeriod` in interface `PeriodicWatchMBean`
  Returns:
    Value of property period.
  See Also:
    `PeriodicWatchMBean.getPeriod()`

### setPeriod

    public void setPeriod(long newPeriod)

  Description copied from interface: `PeriodicWatchMBean`
  Setter for property period.

  Specified by:
    `setPeriod` in interface `PeriodicWatchMBean`
  Parameters:
    `newPeriod` - New value of property period. The result of invoking this method will be to stop the PeriodicWatch and reschedule the subsequent fixed-delay execution based on the value provided for period
  See Also:
    `PeriodicWatchMBean.setPeriod(long)`

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.