org.apache.avalon.excalibur.monitor
Interface Monitor

All Known Implementing Classes:
PassiveMonitor, ActiveMonitor

public interface Monitor

The Monitor is used to actively check a set of resources to see if they have changed. It will be implemented as a Component, that can be retrieved from the ComponentManager.

Version:
$Id: Monitor.java,v 1.3 2001/12/11 09:53:30 jefft Exp $
Author:
Berin Loritsch

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 void addResource(Resource resource)
          Add a resource to monitor.
 Resource getResource(java.lang.String key)
          Find a monitored resource.
 void removeResource(Resource resource)
          Remove a monitored resource by reference.
 void removeResource(java.lang.String key)
          Remove a monitored resource by key.
 

Field Detail

ROLE

public static final java.lang.String ROLE
Method Detail

addResource

public void addResource(Resource resource)
Add a resource to monitor. The resource key referenced in the other interfaces is derived from the resource object.

getResource

public Resource getResource(java.lang.String key)
Find a monitored resource. If no resource is available, return null

removeResource

public void removeResource(java.lang.String key)
Remove a monitored resource by key.

removeResource

public void removeResource(Resource resource)
Remove a monitored resource by reference.


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.