com.sun.enterprise.admin.monitor.registry
Class MonitoringLevel

java.lang.Object
  extended by com.sun.enterprise.admin.monitor.registry.MonitoringLevel

public class MonitoringLevel
extends Object

Provides enumerated constants related to various levels at which monitoring could be set

Author:
Shreedhar Ganapathy, Kedar Mhaswade

Field Summary
static MonitoringLevel HIGH
           
static MonitoringLevel LOW
           
static MonitoringLevel OFF
           
 
Method Summary
 boolean equals(Object obj)
          Checks two MonitoringLevel objects for equality.
 int hashCode()
          Returns the hash code value for this object.
static MonitoringLevel instance(String name)
          Returns an instance of MonitoringLevel for the given String.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OFF

public static final MonitoringLevel OFF

LOW

public static final MonitoringLevel LOW

HIGH

public static final MonitoringLevel HIGH
Method Detail

toString

public String toString()
Overrides:
toString in class Object

instance

public static MonitoringLevel instance(String name)
Returns an instance of MonitoringLevel for the given String. The given String has to correspond to one of the public fields declared in this class.

Parameters:
name - String representing the MonitoringLevel
Returns:
MonitoringLevel corresponding to given parameter, or null if the parameter is null or does not correspond to any of the Monitoring Levels supported. For $Revision: 1.2 $ of this class, "off", "high" and "low" are supported strings. The comparison is done case insensitively.

equals

public boolean equals(Object obj)
Checks two MonitoringLevel objects for equality.

Checks that obj is a MonitoringLevel, and has the same name as this object.

Overrides:
equals in class Object
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is a MonitoringLevel, and has the same name as this MonitoringLevel object.

hashCode

public int hashCode()
Returns the hash code value for this object.

The hash code returned is the hash code of the name of this MonitoringLevel object.

Overrides:
hashCode in class Object
Returns:
Hash code value for this object.


Copyright © 2012. All Rights Reserved.