org.apache.avalon.excalibur.monitor.impl
Class ActiveMonitor

java.lang.Object
  extended byorg.apache.avalon.excalibur.monitor.impl.AbstractMonitor
      extended byorg.apache.avalon.excalibur.monitor.impl.ActiveMonitor
All Implemented Interfaces:
Component, Monitor, java.lang.Runnable
Direct Known Subclasses:
ActiveMonitor

public class ActiveMonitor
extends AbstractMonitor
implements java.lang.Runnable

The ActiveMonitor is used to actively check a set of resources to see if they have changed. It will poll the resources with a frequency as specified or if unspecified with the default (60 seconds).

Version:
$Id: ActiveMonitor.java,v 1.5 2004/02/28 11:47:35 cziegeler Exp $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.excalibur.monitor.Monitor
ROLE
 
Constructor Summary
ActiveMonitor()
           
 
Method Summary
 void run()
           
 void setFrequency(long frequency)
          Set the frequency with which the monitor checks the resources.
 void setPriority(int priority)
          Set the priority of the active monitors thread.
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.avalon.excalibur.monitor.impl.AbstractMonitor
addResource, addResources, getResource, getResources, removeResource, removeResource, scanAllResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveMonitor

public ActiveMonitor()
Method Detail

setFrequency

public void setFrequency(long frequency)
Set the frequency with which the monitor checks the resources. This can be changed anytime and will be enabled the next time through the check.

Parameters:
frequency - the frequency to scan resources for changes

setPriority

public void setPriority(int priority)
Set the priority of the active monitors thread.

Parameters:
priority - the priority of the active monitors thread.

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

run

public final void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.