Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.5.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.autoinventory
Class ScanState

    java.lang.Object
      org.hyperic.hq.autoinventory.ScanState

    public class ScanState

extends Object

Constructor Summary
`ScanState()`
`ScanState(ScanStateCore core)`

Method Summary
`void` | `addScanException(ScanMethod scanMethod, Throwable t)`
`void` | `addScanExceptions(ScanMethod scanMethod, Throwable[] t)`
`void` | `addServers(ScanMethod scanMethod, List servers)` Add servers to the list of servers detected for a particular scan method.
`boolean` | `completedOK()`
`protected ScanMethod` | `findScanMethod(String methodClass)`
`protected ScanMethodState` | `findSMState(String caller, ScanMethod scanMethod)`
`Set` | `getAllServers()` Get the set of all servers detected in this autoinventory scan.
`boolean` | `getAreServersIncluded()`
`String` | `getCertDN()`
`ScanStateCore` | `getCore()`
`String` | `getElapsedTimeStr()`
`long` | `getEndTime()`
`String` | `getEndTimeStr()`
`org.hyperic.util.StringifiedException` | `getGlobalException()`
`boolean` | `getIsDefaultScan()`
`boolean` | `getIsDone()`
`boolean` | `getIsInterrupted()`
`AIPlatformValue` | `getPlatform()`
`long` | `getScanDuration()`
`ScanMethodState[]` | `getScanMethodStates()`
`long` | `getStartTime()`
`String` | `getStartTimeStr()`
`boolean` | `hasExceptions()`
`void` | `initEndTime()`
`void` | `initStartTime()`
`boolean` | `isSameState(ScanState other)`
`void` | `printFullStatus(PrintStream out)` For debugging and command-line use, pretty-print full status info.
`void` | `printMainStatus(PrintStream out)`
`void` | `printMethodStatus(ScanMethodState smState, PrintStream out)`
`void` | `printServers()` For debugging purposes, print out the servers that were detected.
`void` | `printStackTraces()` For debugging purposes, print stack traces for all exceptions
`void` | `setAreServersIncluded(boolean b)`
`void` | `setCertDN(String certDN)`
`void` | `setCore(ScanStateCore core)`
`void` | `setEndTime(long endTime)`
`void` | `setGlobalException(Throwable _globalException)`
`void` | `setIsDefaultScan(boolean b)`
`void` | `setIsDone()`
`void` | `setIsInterrupted()`
`void` | `setPlatform(AIPlatformValue platform)`
`void` | `setScanMethods(String[] scanMethods)` Tell the scan state what scan methods will be run.
`void` | `setScanStatus(ScanMethod scanMethod, String status)`
`void` | `setStartTime(long startTime)`
`protected void` | `setupMethodHash()` Setup our internal hash of ScanMethodClassName->ScanMethod
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ScanState

    public ScanState()

### ScanState

    public ScanState(ScanStateCore core)

Method Detail

### getCore

    public ScanStateCore getCore()

### setCore

    public void setCore(ScanStateCore core)

### getIsDefaultScan

    public boolean getIsDefaultScan()

### setIsDefaultScan

    public void setIsDefaultScan(boolean b)

### getAreServersIncluded

    public boolean getAreServersIncluded()

### setAreServersIncluded

    public void setAreServersIncluded(boolean b)

### getStartTime

    public long getStartTime()

### getStartTimeStr

    public String getStartTimeStr()

  Returns:
    the formatted start time

### setStartTime

    public void setStartTime(long startTime)

### getEndTime

    public long getEndTime()

### getEndTimeStr

    public String getEndTimeStr()

### setEndTime

    public void setEndTime(long endTime)

### getElapsedTimeStr

    public String getElapsedTimeStr()

  Returns:
    the formatted relapsed time

### getIsDone

    public boolean getIsDone()

### setIsDone

    public void setIsDone()

### getIsInterrupted

    public boolean getIsInterrupted()

### setIsInterrupted

    public void setIsInterrupted()

### getGlobalException

    public org.hyperic.util.StringifiedException getGlobalException()

### setGlobalException

    public void setGlobalException(Throwable _globalException)

### setScanMethods

    public void setScanMethods(String[] scanMethods)
                        throws AutoinventoryException

  Tell the scan state what scan methods will be run.

  Parameters:
    `scanMethods` - An array of ScanMethod class names that represent the ScanMethods that will be run in this scan.
  Throws:
    `AutoinventoryException`

### setupMethodHash

    protected void setupMethodHash()
                            throws AutoinventoryException

  Setup our internal hash of ScanMethodClassName->ScanMethod

  Throws:
    `AutoinventoryException`

### completedOK

    public boolean completedOK()

### hasExceptions

    public boolean hasExceptions()

### initStartTime

    public void initStartTime()

### initEndTime

    public void initEndTime()

### getScanDuration

    public long getScanDuration()

### getPlatform

    public AIPlatformValue getPlatform()

### setPlatform

    public void setPlatform(AIPlatformValue platform)

### getCertDN

    public String getCertDN()

### setCertDN

    public void setCertDN(String certDN)

### addScanException

    public void addScanException(ScanMethod scanMethod,
                                 Throwable t)

### addScanExceptions

    public void addScanExceptions(ScanMethod scanMethod,
                                  Throwable[] t)

### setScanStatus

    public void setScanStatus(ScanMethod scanMethod,
                              String status)

### getScanMethodStates

    public ScanMethodState[] getScanMethodStates()

### addServers

    public void addServers(ScanMethod scanMethod,
                           List servers)

  Add servers to the list of servers detected for a particular scan method.

  Parameters:
    `scanMethod` - The scan method to add servers to.
    `servers` - A List of AIServer objects representing the servers (and their services) that were detected and should be added and associated with the given scan method.

### printServers

    public void printServers()

  For debugging purposes, print out the servers that were detected.

### printStackTraces

    public void printStackTraces()

  For debugging purposes, print stack traces for all exceptions

### printFullStatus

    public void printFullStatus(PrintStream out)
                         throws AutoinventoryException

  For debugging and command-line use, pretty-print full status info.

  Parameters:
    `out` - The stream to write to.
  Throws:
    `AutoinventoryException`

### printMainStatus

    public void printMainStatus(PrintStream out)

### printMethodStatus

    public void printMethodStatus(ScanMethodState smState,
                                  PrintStream out)
                           throws AutoinventoryException

  Throws:
    `AutoinventoryException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getAllServers

    public Set getAllServers()
                      throws AutoinventoryException

  Get the set of all servers detected in this autoinventory scan. This is the method that reconciles the fact that multiple scan methods may have discovered the same server. We assemble the list of all servers by iterating over each scan method in order of authority level. The scan methods with the highest authority level have their servers added first. Scan methods with lower authority levels will have their servers added as long as they have a different autoinventory ID from ones discovered by methods with higher authority levels.

  Returns:
    A Set of AIServerValue objects. The Set uniqueness is based on the server autoinventory identifier, which is usually the same as the install path.
  Throws:
    `AutoinventoryException`

### findSMState

    protected ScanMethodState findSMState(String caller,
                                          ScanMethod scanMethod)

### findScanMethod

    protected ScanMethod findScanMethod(String methodClass)
                                 throws AutoinventoryException

  Throws:
    `AutoinventoryException`

### isSameState

    public boolean isSameState(ScanState other)
                        throws AutoinventoryException

  Throws:
    `AutoinventoryException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.5.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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