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

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

public class ActiveMonitor
extends AbstractMonitor
implements 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 Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

run

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


Copyright © 1997-2012 Apache Software Foundation. All Rights Reserved.