public final class HealthState
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
HEALTH_CRITICAL
Something must be done now to prevent service failure.
|
static int |
HEALTH_FAILED
Service has failed - must be restarted.
|
static int |
HEALTH_OK
Server Service is healthy.
|
static int |
HEALTH_OVERLOADED
Service is functioning normally but there is too much work in it.
|
static int |
HEALTH_WARN
Service could have problems in the future.
|
private boolean |
isCritical |
static java.lang.String |
ITEM_COMPONENT |
static java.lang.String |
ITEM_HEALTH_STATE |
static java.lang.String |
ITEM_IS_CRITICAL |
static java.lang.String |
ITEM_MBEAN |
static java.lang.String |
ITEM_PARTITION |
static java.lang.String |
ITEM_REASON_CODE |
static java.lang.String |
ITEM_SYMPTOMS |
private static java.lang.String[] |
itemDescriptions |
private static java.lang.String[] |
itemNames |
private static int[] |
logicalSeverityOrder |
static java.lang.String |
LOW_MEMORY_REASON
Reason code that indicates that the server is low on memory.
|
private java.lang.String |
mbeanName |
private java.lang.String |
mbeanType |
private static java.lang.String[] |
NULL_REASONS |
private static Symptom[] |
NULL_SYMPTOMS |
static java.lang.String |
OPEN_DESCRIPTION |
static java.lang.String |
OPEN_TYPE_NAME |
private java.lang.String |
partitionName |
private java.lang.String[] |
reasonCode |
private static long |
serialVersionUID |
private int |
state |
private java.lang.String |
subsystemName |
private Symptom[] |
symptoms |
Constructor and Description |
---|
HealthState(int s)
Construct a HealthState with given state.
|
HealthState(int state,
Symptom symptom)
Construct a HealthState with given state and a symptom.
|
HealthState(int state,
Symptom[] symptoms)
Construct a HealthState with given state and an array of symptoms.
|
HealthState(int state,
Symptom[] symptoms,
java.lang.String partitionName)
Construct a HealthState with given state and an array of symptoms.
|
HealthState(int state,
Symptom symptom,
java.lang.String partitionName)
Construct a HealthState with given state and a symptom.
|
Modifier and Type | Method and Description |
---|---|
static int |
compareSeverities(int aState,
int baseState) |
int |
compareSeverityTo(HealthState other)
Compares the severity of the supplied HealthState to this object's
severity.
|
int |
compareSeverityTo(int otherState) |
protected java.util.Map |
getCompositeDataMap()
creates a map of attribute values for use in CompositeData construction
|
protected javax.management.openmbean.CompositeType |
getCompositeType()
creates the open data CompositType instance for this object
|
java.lang.String |
getMBeanName() |
java.lang.String |
getMBeanType() |
java.lang.String |
getPartitionName()
Get partition name for this health state
|
java.lang.String[] |
getReasonCode()
Deprecated.
|
java.lang.String |
getReasonCodeSummary()
Returns the reason codes array values concatenated into a single String,
to allow the reason codes to be collected by WLDF Harvester.
|
int |
getState()
Health state returned by this service.
|
java.lang.String |
getSubsystemName()
Name of the service providing health information
|
Symptom[] |
getSymptoms()
Get symptoms for this health state
|
boolean |
isCritical() |
static java.lang.String |
mapToString(int intValue)
Provides string representation of health states.
|
void |
setCritical(boolean isCritical) |
void |
setMBeanName(java.lang.String name) |
void |
setMBeanType(java.lang.String type) |
void |
setPartitionName(java.lang.String partitionName) |
void |
setSubsystemName(java.lang.String key) |
private java.lang.String[] |
symptomsToReasoncode(Symptom[] symptoms) |
javax.management.openmbean.CompositeData |
toCompositeData()
Converts a
ConsumerInfo instance to a CompositeData representation. |
java.lang.String |
toString() |
private static final long serialVersionUID
public static final int HEALTH_OK
public static final int HEALTH_WARN
public static final int HEALTH_CRITICAL
public static final int HEALTH_FAILED
public static final int HEALTH_OVERLOADED
public static final java.lang.String LOW_MEMORY_REASON
OVERLOADED
with this reason
code if the low threshold is reached.OverloadProtectionMBean
,
Constant Field Valuesprivate static final java.lang.String[] NULL_REASONS
private static final Symptom[] NULL_SYMPTOMS
private final int state
private final java.lang.String[] reasonCode
private final Symptom[] symptoms
private java.lang.String partitionName
private java.lang.String subsystemName
public static final java.lang.String OPEN_TYPE_NAME
public static final java.lang.String OPEN_DESCRIPTION
public static final java.lang.String ITEM_COMPONENT
public static final java.lang.String ITEM_HEALTH_STATE
public static final java.lang.String ITEM_MBEAN
public static final java.lang.String ITEM_SYMPTOMS
public static final java.lang.String ITEM_REASON_CODE
public static final java.lang.String ITEM_IS_CRITICAL
public static final java.lang.String ITEM_PARTITION
private static java.lang.String[] itemNames
private static java.lang.String[] itemDescriptions
private static final int[] logicalSeverityOrder
private boolean isCritical
private java.lang.String mbeanName
private java.lang.String mbeanType
public HealthState(int s)
s
- HealthStatepublic HealthState(int state, Symptom symptom)
state
- health statesymptom
- Symptompublic HealthState(int state, Symptom symptom, java.lang.String partitionName)
state
- health statesymptom
- SymptompartitionName
- public HealthState(int state, Symptom[] symptoms)
state
- health statesymptoms
- array of Symptompublic HealthState(int state, Symptom[] symptoms, java.lang.String partitionName)
state
- health statesymptoms
- array of SymptompartitionName
- private java.lang.String[] symptomsToReasoncode(Symptom[] symptoms)
public java.lang.String getSubsystemName()
public int getState()
HEALTH_OK
, HEALTH_WARN
,
HEALTH_CRITICAL
, HEALTH_FAILED
,
HEALTH_OVERLOADED
public int compareSeverityTo(HealthState other)
other
- public int compareSeverityTo(int otherState)
public static int compareSeverities(int aState, int baseState)
@Deprecated public java.lang.String[] getReasonCode()
public java.lang.String getReasonCodeSummary()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String mapToString(int intValue)
public void setSubsystemName(java.lang.String key)
public javax.management.openmbean.CompositeData toCompositeData() throws javax.management.openmbean.OpenDataException
Converts a ConsumerInfo
instance to a CompositeData representation.
javax.management.openmbean.OpenDataException
- Thrown when an error occurs while constructing the CompositeData
representation.protected javax.management.openmbean.CompositeType getCompositeType() throws javax.management.openmbean.OpenDataException
javax.management.openmbean.OpenDataException
protected java.util.Map getCompositeDataMap() throws javax.management.openmbean.OpenDataException
javax.management.openmbean.OpenDataException
public void setCritical(boolean isCritical)
public boolean isCritical()
public void setMBeanName(java.lang.String name)
public java.lang.String getMBeanName()
public void setMBeanType(java.lang.String type)
public java.lang.String getMBeanType()
public Symptom[] getSymptoms()
public java.lang.String getPartitionName()
public void setPartitionName(java.lang.String partitionName)
partitionName
-