HiRISE

HiRISE.HiReport.util
Class ConductorStatusAnalyzer

java.lang.Object
  extended by HiRISE.HiReport.util.ConductorStatusAnalyzer

public class ConductorStatusAnalyzer
extends Object

Analyzes Conductor status strings to determine the state of the source.


Field Summary
static Pattern busyPattern
          pattern matching busy process, ends with positive number
protected  String descr
          Description of the state
static Pattern failPattern
          pattern matching failure
static Pattern goodPattern
          pattern matching success including accepted failures
static String ID
          CVS ID
protected static Logger logger
          Logger
static Pattern okayPattern
          pattern matching accepted non-zero success
static Pattern quitPattern
          pattern matching critical failure, ends with negative number
protected  int sequence
          The current sequence number the source is determined to be in
 
Constructor Summary
ConductorStatusAnalyzer()
           
 
Method Summary
 ConductorState analyze(String status, String conductorID)
          Set the status String.
 String getDescription()
          Get a description of the status.
 int getSequence()
          Get the sequence number, if none
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
CVS ID

See Also:
Constant Field Values

descr

protected String descr
Description of the state


sequence

protected int sequence
The current sequence number the source is determined to be in


logger

protected static Logger logger
Logger


quitPattern

public static final Pattern quitPattern
pattern matching critical failure, ends with negative number


busyPattern

public static final Pattern busyPattern
pattern matching busy process, ends with positive number


goodPattern

public static final Pattern goodPattern
pattern matching success including accepted failures


failPattern

public static final Pattern failPattern
pattern matching failure


okayPattern

public static final Pattern okayPattern
pattern matching accepted non-zero success

Constructor Detail

ConductorStatusAnalyzer

public ConductorStatusAnalyzer()
Method Detail

analyze

public ConductorState analyze(String status,
                              String conductorID)
Set the status String. The Conductor state will be determined based on these values.

Parameters:
status - value from status field
conductorID - value from conductor_ID field
Returns:
state

getSequence

public int getSequence()
Get the sequence number, if none

Returns:
0 for unknown, positive if known

getDescription

public String getDescription()
Get a description of the status.

Returns:
Human-readable description

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona