Openwings API Documentation (v1.1)

net.openwings.availability
Class UnitReport

java.lang.Object
  extended bynet.openwings.availability.UnitReport
All Implemented Interfaces:
java.io.Serializable

public class UnitReport
extends java.lang.Object
implements java.io.Serializable

This class is used to report a fault in a unit (a component or a specific capability provided by a component).

See Also:
Serialized Form

Field Summary
static int ACTIVE
          This constant is used to indicate that a unit is active.
static int BACKUP
          This constant is used to indicate that a unit is a backup unit.
static int DEGRADED
          This constant is used to indicate that a unit has reduced performance.
static int INITIALIZING
          This constant is used to indicate that a unit is initializing.
static int NA
          This constant is used to indicate that a unit is not applicable.
static int NO_RESPONSE
          This constant is used to indicate that a unit is not responding.
static int NOT_ACTIVE
          This constant is used to indicate that a unit is not active
static int OFFLINE
          This constant is used to indicate that a unit is unavailable.
static int ONLINE
          This constant is used to indicate that a unit is available.
 
Constructor Summary
UnitReport()
          Default constructor.
UnitReport(java.lang.String name, java.lang.String description, int status, int state, java.util.Date timeStamp)
          This is the primary constructor for this class.
 
Method Summary
 boolean equals(java.lang.Object obj)
          overrides the default equals() method
 boolean getDegraded()
          This method is used to get the degraded status.
 java.lang.String getDescription()
          This method is used to get the desription of the fault.
 java.lang.String getName()
          This method is used to get the name of the unit under test.
 int getState()
          This method is used to get the state of this unit.
 int getStatus()
          This method is used to get the status of this unit.
 java.util.Date getTimestamp()
          This method is used to get the date of this unit.
 int hashCode()
          overrides default hashCode() method.
 void setDegraded(boolean degraded)
          This method is used to set the degraded status.
 void setDescription(java.lang.String description)
          This method is used to set the desription of the fault.
 void setName(java.lang.String name)
          This method is used to set the name of the unit under test.
 void setState(int state)
          This method is used to set the state of this unit.
 void setStatus(int status)
          This method is used to set the status of this unit.
 void setTimestamp(java.util.Date timeStamp)
          This method is used to set the date.
 java.lang.String toString()
          overrides default toString() method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OFFLINE

public static final int OFFLINE
This constant is used to indicate that a unit is unavailable.

See Also:
Constant Field Values

DEGRADED

public static final int DEGRADED
This constant is used to indicate that a unit has reduced performance.

See Also:
Constant Field Values

ONLINE

public static final int ONLINE
This constant is used to indicate that a unit is available.

See Also:
Constant Field Values

NO_RESPONSE

public static final int NO_RESPONSE
This constant is used to indicate that a unit is not responding.

See Also:
Constant Field Values

INITIALIZING

public static final int INITIALIZING
This constant is used to indicate that a unit is initializing.

See Also:
Constant Field Values

ACTIVE

public static final int ACTIVE
This constant is used to indicate that a unit is active.

See Also:
Constant Field Values

BACKUP

public static final int BACKUP
This constant is used to indicate that a unit is a backup unit.

See Also:
Constant Field Values

NA

public static final int NA
This constant is used to indicate that a unit is not applicable.

See Also:
Constant Field Values

NOT_ACTIVE

public static final int NOT_ACTIVE
This constant is used to indicate that a unit is not active

See Also:
Constant Field Values
Constructor Detail

UnitReport

public UnitReport()
Default constructor.


UnitReport

public UnitReport(java.lang.String name,
                  java.lang.String description,
                  int status,
                  int state,
                  java.util.Date timeStamp)
This is the primary constructor for this class.

Parameters:
name - the name of the unit under test.
description - the description of the fault.
status - the OFFLINE, ONLINE status indicator.
Method Detail

getStatus

public int getStatus()
This method is used to get the status of this unit.

Returns:
the status of the unit under test: OFFLINE, ONLINE

setStatus

public void setStatus(int status)
This method is used to set the status of this unit.

Parameters:
status - the status of the unit under test: OFFLINE, ONLINE

getState

public int getState()
This method is used to get the state of this unit.

Returns:
the state of the unit under test: NO_RESPONSE, INITIALIZING, ACTIVE, BACKUP, NA

setState

public void setState(int state)
This method is used to set the state of this unit.

Parameters:
state - the state of the unit under test: NO_RESPONSE, INITIALIZING, ACTIVE, BACKUP, NA

getTimestamp

public java.util.Date getTimestamp()
This method is used to get the date of this unit.

Returns:
the date of the unit under test:

setTimestamp

public void setTimestamp(java.util.Date timeStamp)
This method is used to set the date.


getName

public java.lang.String getName()
This method is used to get the name of the unit under test.

Returns:
the name of the unit

setName

public void setName(java.lang.String name)
This method is used to set the name of the unit under test.

Parameters:
name - the name of the unit

getDescription

public java.lang.String getDescription()
This method is used to get the desription of the fault.

Returns:
the fault description

setDescription

public void setDescription(java.lang.String description)
This method is used to set the desription of the fault.

Parameters:
description - the fault description

getDegraded

public boolean getDegraded()
This method is used to get the degraded status.

Returns:
true if degraded

setDegraded

public void setDegraded(boolean degraded)
This method is used to set the degraded status.

Parameters:
degraded - true if degraded

equals

public final boolean equals(java.lang.Object obj)
overrides the default equals() method


hashCode

public final int hashCode()
overrides default hashCode() method.


toString

public java.lang.String toString()
overrides default toString() method.


Openwings API Documentation (v1.1)