Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.autoinventory.scanimpl
Class FileScan

java.lang.Object
  extended by org.hyperic.hq.autoinventory.scanimpl.ScanMethodBase
      extended by org.hyperic.hq.autoinventory.scanimpl.FileScan
All Implemented Interfaces:
ScanMethod, MatcherInterruptCallback, MatcherProgressCallback

public class FileScan
extends ScanMethodBase
implements MatcherInterruptCallback, MatcherProgressCallback

This implementation of ScanMethod knows how to scan the filesystem. It can be configured to scan the whole filesystem, or to only scan certain directories while ignoring others. It can also ignore entire filesystems of a particular type, for example network mounted filesystems or CD-ROM drives (ie iso9660 filesystems).


Field Summary
static java.lang.String FS_TYPE_ALL
           
static java.lang.String FS_TYPE_LOCAL
           
static java.lang.String FS_TYPE_NETWORK
           
static java.lang.String[] FS_TYPES
           
 
Fields inherited from class org.hyperic.hq.autoinventory.scanimpl.ScanMethodBase
_authorityLevel, _config, _scanner, _state
 
Constructor Summary
FileScan()
           
FileScan(boolean isWindows)
           
 
Method Summary
 java.lang.String getDescription()
          Get the description of this ScanMethod.
 java.lang.String getDisplayName()
          Get the human readable name of this ScanMethod.
 boolean getIsInterrupted()
           
 java.lang.String getName()
          Get the name of this ScanMethod.
protected  ConfigOption[] getOptionsArray()
          Subclasses implement this method to return the array of ConfigOptions supported by the scan method.
 void notifyScanDir(java.io.File dir)
          The MatcherScanner calls this method for each directory it traverses.
 void scan(ConfigResponse platformConfig, ServerDetector[] serverDetectors)
          Perform a scan for this method.
 
Methods inherited from class org.hyperic.hq.autoinventory.scanimpl.ScanMethodBase
getAuthorityLevel, getConfig, getConfigSchema, init, setAuthorityLevel, setScanner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FS_TYPE_ALL

public static final java.lang.String FS_TYPE_ALL
See Also:
Constant Field Values

FS_TYPE_LOCAL

public static final java.lang.String FS_TYPE_LOCAL
See Also:
Constant Field Values

FS_TYPE_NETWORK

public static final java.lang.String FS_TYPE_NETWORK
See Also:
Constant Field Values

FS_TYPES

public static final java.lang.String[] FS_TYPES
Constructor Detail

FileScan

public FileScan()

FileScan

public FileScan(boolean isWindows)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ScanMethod
Get the name of this ScanMethod.

Specified by:
getName in interface ScanMethod

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: ScanMethod
Get the human readable name of this ScanMethod.

Specified by:
getDisplayName in interface ScanMethod

getDescription

public java.lang.String getDescription()
Description copied from interface: ScanMethod
Get the description of this ScanMethod.

Specified by:
getDescription in interface ScanMethod

getOptionsArray

protected ConfigOption[] getOptionsArray()
Description copied from class: ScanMethodBase
Subclasses implement this method to return the array of ConfigOptions supported by the scan method.

Specified by:
getOptionsArray in class ScanMethodBase
Returns:
An array of ConfigOptions for this ScanMethod.

scan

public void scan(ConfigResponse platformConfig,
                 ServerDetector[] serverDetectors)
          throws AutoinventoryException
Description copied from interface: ScanMethod
Perform a scan for this method.

Specified by:
scan in interface ScanMethod
Parameters:
platformConfig - ConfigResponse for the platform
serverDetectors - an array of ServerDetectors to use when scanning.
Throws:
AutoinventoryException - If an error occurs during the scan.

getIsInterrupted

public boolean getIsInterrupted()
Specified by:
getIsInterrupted in interface MatcherInterruptCallback
Returns:
true if the matcher should be interrupted and exit immediately, false if the matcher should continue searching for matches.
See Also:
MatcherInterruptCallback.getIsInterrupted()

notifyScanDir

public void notifyScanDir(java.io.File dir)
Description copied from interface: MatcherProgressCallback
The MatcherScanner calls this method for each directory it traverses.

Specified by:
notifyScanDir in interface MatcherProgressCallback
See Also:
MatcherProgressCallback.notifyScanDir(java.io.File)

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.