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
Interface WatchRegistry

All Known Implementing Classes:
  WatchDataSourceRegistry

    public interface WatchRegistry

Defines the semantics for a registry of `Watch` instances and their corresponding `WatchDataSource` instances, providing capabilities to search over all registered `Watch` instances.

Method Summary
`void` | `addThresholdListener(String id, ThresholdListener thresholdListener)` Add a ThresholdListener.
`void` | `closeAll()` Closes all WatchDataSource instances
`void` | `deregister(Watch watch)` DeRegisters a Watch from underlying collection and closes the Watch
`WatchDataSource[]` | `fetch()` Returns an array of WatchDataSource objects which provide a reference to an implementation of WatchDataSource.
`WatchDataSource[]` | `fetch(String id)` Returns an array of WatchDataSource objects which match the input id which corresponds to a Watch identifier.
`Watch[]` | `findWatch(String id)` Returns an array of Watch objects based on the input id
`void` | `register(Watch watch)` Registers a Watch to underlying collection
`void` | `setServiceBeanContext(ServiceBeanContext context)` Set the ServiceBeanContext for the WatchRegistry

Method Detail

### deregister

    void deregister(Watch watch)

  DeRegisters a Watch from underlying collection and closes the Watch

  Parameters:
    `watch` - The Watch to deregister

### closeAll

    void closeAll()

  Closes all WatchDataSource instances

### register

    void register(Watch watch)

  Registers a Watch to underlying collection

  Parameters:
    `watch` - The Watch to register

### addThresholdListener

    void addThresholdListener(String id,
                              ThresholdListener thresholdListener)

  Add a ThresholdListener. The ThresholdListener will be added as a ThresholdListener to any ThresholdWatch instances that match the ThresholdListener when the ThresholdWatch is registered using the `register` method

  Parameters:
    `id` - The identifier to match
    `thresholdListener` - The ThresholdListener to add

### findWatch

    Watch[] findWatch(String id)

  Returns an array of Watch objects based on the input id

  Parameters:
    `id` - The watch id to match
  Returns:
    Array of Watch objects that match the input id. If there are no Watch objects that match the id, this method returns a zero-length array

### fetch

    WatchDataSource[] fetch()

  Returns an array of WatchDataSource objects which provide a reference to an implementation of WatchDataSource.

  Returns:
    An array of WatchDataSource objects. If there are no WatchDataSource objects, this method returns an empty array

### fetch

    WatchDataSource[] fetch(String id)

  Returns an array of WatchDataSource objects which match the input

      id

  which corresponds to a

      Watch

  identifier. The WatchDataSource object(s) returned provide a reference to an implementation of WatchDataSource.

  Parameters:
    `id` - the watch id to match
  Returns:
    An array of WatchDataSource objects that match the id. If there are no WatchDataSource objects, this method returns an empty array

### setServiceBeanContext

    void setServiceBeanContext(ServiceBeanContext context)

  Set the ServiceBeanContext for the WatchRegistry

  Parameters:
    `context` - The `ServiceBeanContext`

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.