org.apache.avalon.excalibur.monitor.impl
Class ActiveMonitor
java.lang.Object
org.apache.avalon.excalibur.monitor.impl.AbstractMonitor
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
Fields inherited from interface org.apache.avalon.excalibur.monitor.Monitor |
ROLE |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActiveMonitor
public ActiveMonitor()
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.