Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

weblogic.health
Class HealthState

java.lang.Object
  extended by weblogic.health.HealthState
All Implemented Interfaces:
Serializable

public final class HealthState
extends Object
implements Serializable

This class encapsulates the health information returned by a Server Service. Services register with the server self-health monitor service and provide health information through this class.

See Also:
Serialized Form

Field Summary
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.
static String LOW_MEMORY_REASON
          Reason code that indicates that the server is low on memory.
 
Method Summary
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  Map getCompositeDataMap()
          creates a map of attribute values for use in CompositeData construction
protected  CompositeType getCompositeType()
          creates the open data CompositType instance for this object
 String[] getReasonCode()
          List of reasons corresponding to the current HealthState.
 int getState()
          Health state returned by this service.
 String getSubsystemName()
          Name of the service providing health information
 CompositeData toCompositeData()
           Converts a ConsumerInfo instance to a CompositeData representation.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HEALTH_OK

public static final int HEALTH_OK
Server Service is healthy.

See Also:
Constant Field Values

HEALTH_WARN

public static final int HEALTH_WARN
Service could have problems in the future. Check the server logs and the corresponding RuntimeMBean for more details.

See Also:
Constant Field Values

HEALTH_CRITICAL

public static final int HEALTH_CRITICAL
Something must be done now to prevent service failure. Check the server logs and the corresponding RuntimeMBean for more details.

See Also:
Constant Field Values

HEALTH_FAILED

public static final int HEALTH_FAILED
Service has failed - must be restarted. Check the server logs and the corresponding RuntimeMBean for more details.

See Also:
Constant Field Values

HEALTH_OVERLOADED

public static final int HEALTH_OVERLOADED
Service is functioning normally but there is too much work in it. CRITICAL and OVERLOADED are different. A subsystem is in critical state when a part of it is malfunctioning e.g stuck threads. An overloaded state means that there is more work assigned to the Service than the configured threshold. A service might refuse more work in this state.

See Also:
Constant Field Values

LOW_MEMORY_REASON

public static final String LOW_MEMORY_REASON
Reason code that indicates that the server is low on memory. Administrators can configure low and high thresholds for memory usage and the server health changes to OVERLOADED with this reason code if the low threshold is reached.

See Also:
OverloadProtectionMBean, Constant Field Values
Method Detail

getSubsystemName

public String getSubsystemName()
Name of the service providing health information


getState

public int getState()
Health state returned by this service. Can be one of HEALTH_OK, HEALTH_WARN, HEALTH_CRITICAL, HEALTH_FAILED, HEALTH_OVERLOADED


compareSeverityTo

public int compareSeverityTo(HealthState other)
Compares the severity of the supplied HealthState to this object's severity. BUG12620669 necessitated the need to logically compare the severity of different health state objects which could be done by getState() except the logical order is wrong where FAILED < OVERLOADED.

Parameters:
other -
Returns:
a negative integer, zero, or a positive integer as this object's severity is less than, equal to, or greater than supplied object's severity.

compareSeverityTo

public int compareSeverityTo(int otherState)

compareSeverities

public static int compareSeverities(int aState,
                                    int baseState)

getReasonCode

public String[] getReasonCode()
List of reasons corresponding to the current HealthState.


toString

public String toString()
Overrides:
toString in class Object

toCompositeData

public CompositeData toCompositeData()
                              throws OpenDataException

Converts a ConsumerInfo instance to a CompositeData representation.

Returns:
the CompositeData representation of the object.
Throws:
OpenDataException - Thrown when an error occurs while constructing the CompositeData representation.

getCompositeType

protected CompositeType getCompositeType()
                                  throws OpenDataException
creates the open data CompositType instance for this object

Throws:
OpenDataException

getCompositeDataMap

protected Map getCompositeDataMap()
creates a map of attribute values for use in CompositeData construction


Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02