|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.autoinventory.ScanManager
public class ScanManager
The ScanManager controls the Scanner and ensures that only 1 scan is running at a time. If someone tries to start a scan while another scan is running, we'll cue up that scan to run immediately after the current scan completes.
Constructor Summary | |
---|---|
ScanManager(ScanListener listener,
org.apache.commons.logging.Log log,
AutoinventoryPluginManager apm,
RuntimeScanner rtScanner)
Create a scan manager. |
Method Summary | |
---|---|
ScanState |
getStatus()
Get the status of the currently running scan. |
void |
interruptHangingScan()
|
boolean |
isScanQueued()
|
boolean |
isScanRunning()
|
boolean |
queueScan(ScanConfiguration scanConfig)
Start a new scan, using the specified scan configuration. |
void |
scanComplete(ScanState state)
The scanner calls this method when the scan has completed. |
void |
shutdown(long timeout)
Stop the ScanManager. |
void |
startup()
Startup the ScanManager. |
boolean |
stopScan()
Stops the currently running scan. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScanManager(ScanListener listener, org.apache.commons.logging.Log log, AutoinventoryPluginManager apm, RuntimeScanner rtScanner)
listener
- The ScanListener to be notified when scans complete.log
- The log to use.apm
- The Autoinventory plugin manager to use for loading
platform and server detectors.rtScanner
- The RuntimeScanner to use for runtime scans.
This can be null if no runtime scans are to be performed.Method Detail |
---|
public void startup()
public void shutdown(long timeout)
timeout
- How long to wait for the ScanManager to
gracefully exit before Thread.stop-ing it.public boolean queueScan(ScanConfiguration scanConfig)
scanConfig
- The configuration to use for the scan.
public void interruptHangingScan()
public boolean stopScan() throws AutoinventoryException
AutoinventoryException
public ScanState getStatus()
public boolean isScanRunning()
public boolean isScanQueued()
public void scanComplete(ScanState state) throws AutoinventoryException, SystemException
ScanListener
scanComplete
in interface ScanListener
state
- The final state of the scan. This object is
provided for convenience, as the class implementing
this interface will likely already have a way to get to it.
AutoinventoryException
SystemException
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |