public class ActiveMonitor extends AbstractMonitor implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private static long |
DEFAULT_FREQUENCY |
private long |
m_frequency
The frequency to scan resources for changes measured
in milliseconds.
|
private boolean |
m_keepRunning
Set to false to shutdown the thread.
|
private java.lang.Thread |
m_monitorThread
The thread that does the monitoring.
|
private int |
m_priority
The priority of the thread that monitors resources.
|
| Constructor and Description |
|---|
ActiveMonitor() |
| Modifier and Type | Method and Description |
|---|---|
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() |
addResource, addResources, getResource, getResources, removeResource, removeResource, scanAllResourcesprivate static final long DEFAULT_FREQUENCY
private long m_frequency
private int m_priority
Thread.MIN_PRIORITY.private final java.lang.Thread m_monitorThread
private volatile boolean m_keepRunning
public void setFrequency(long frequency)
frequency - the frequency to scan resources for changespublic void setPriority(int priority)
priority - the priority of the active monitors thread.public void start()
throws java.lang.Exception
java.lang.Exceptionpublic void stop()
throws java.lang.Exception
java.lang.Exceptionpublic final void run()
run in interface java.lang.Runnable