Rio Project 4.2 API Documentation



org.rioproject.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 a WatchDataSource that matches the input id, that corresponds to a Watch identifier.
 Watch findWatch(String id)
          Returns a Watch that matches the provided id
 void register(Watch... watch)
          Registers a Watch to underlying collection
 void removeThresholdListener(String id, ThresholdListener thresholdListener)
          Remove a ThresholdListener.
 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

removeThresholdListener

void removeThresholdListener(String id,
                             ThresholdListener thresholdListener)
Remove a ThresholdListener. The ThresholdListener will be removed as a ThresholdListener from any ThresholdWatch instances that match the ThresholdListener

Parameters:
id - The identifier to match
thresholdListener - The ThresholdListener to remove

findWatch

Watch findWatch(String id)
Returns a Watch that matches the provided id

Parameters:
id - The watch id to match
Returns:
The first Watch that matches the input id. If there is not a matching Watch, this method returns a null

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 a WatchDataSource that matches the input
id
, that corresponds to a
Watch
identifier.

Parameters:
id - the watch id to match
Returns:
The WatchDataSource that matches the id. If there is no WatchDataSource, this method returns null

setServiceBeanContext

void setServiceBeanContext(ServiceBeanContext context)
Set the ServiceBeanContext for the WatchRegistry

Parameters:
context - The ServiceBeanContext

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.