ScanState (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.autoinventory.ScanState class

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## org.hyperic.hq.autoinventory
Class ScanState

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

    public class ScanState

extends java.lang.Object

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

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

  Returns:
    the formatted start time

### setStartTime

    public void setStartTime(long startTime)

### getEndTime

    public long getEndTime()

### getEndTimeStr

    public java.lang.String getEndTimeStr()

### setEndTime

    public void setEndTime(long endTime)

### getElapsedTimeStr

    public java.lang.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 StringifiedException getGlobalException()

### setGlobalException

    public void setGlobalException(java.lang.Throwable _globalException)

### setScanMethods

    public void setScanMethods(java.lang.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 java.lang.String getCertDN()

### setCertDN

    public void setCertDN(java.lang.String certDN)

### addScanException

    public void addScanException(ScanMethod scanMethod,
                                 java.lang.Throwable t)

### addScanExceptions

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

### setScanStatus

    public void setScanStatus(ScanMethod scanMethod,
                              java.lang.String status)

### getScanMethodStates

    public ScanMethodState[] getScanMethodStates()

### addServers

    public void addServers(ScanMethod scanMethod,
                           java.util.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(java.io.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(java.io.PrintStream out)

### printMethodStatus

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

  Throws:
    `AutoinventoryException`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getAllServers

    public java.util.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(java.lang.String caller,
                                          ScanMethod scanMethod)

### findScanMethod

    protected ScanMethod findScanMethod(java.lang.String methodClass)
                                 throws AutoinventoryException

  Throws:
    `AutoinventoryException`

### isSameState

    public boolean isSameState(ScanState other)
                        throws AutoinventoryException

  Throws:
    `AutoinventoryException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

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