IBM WebSphere Application ServerTM
Release 7

com.ibm.websphere.pmi.stat
Class MBeanLevelSpec

java.lang.Object
  extended by com.ibm.websphere.pmi.stat.MBeanLevelSpec
All Implemented Interfaces:
java.io.Serializable

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

This class represents the performance monitoring/instrumentation specification for a JMX Managed Object. The specification allows to enable or disable statistics individually. In 5.0, the MBeanLevelSpec includes an MBean ObjectName, an optional StatDescriptor, and an integer level. In 6.0, the MBeanLevelSpec includes an MBean ObjectName and a list of statistic IDs that needs to be enabled.

See Also:
Serialized Form

Field Summary
static int ALL_STATISTICS
          Indicate all statistics that available for the given MBean
 
Constructor Summary
MBeanLevelSpec(javax.management.ObjectName mName, int level)
          Deprecated. As of 6.0, replaced by MBeanLevelSpec(ObjectName mName, int[] enable).
MBeanLevelSpec(javax.management.ObjectName mName, int[] enable)
          Constructs a monitoring specification to selectively enable statistics.
MBeanLevelSpec(javax.management.ObjectName mName, StatDescriptor sd, int level)
          Deprecated. As of 6.0, replaced by MBeanLevelSpec(ObjectName mName, int[] enable).
 
Method Summary
 int[] getEnabled()
          Get the list of statistics that are enabled.
 int getLevel()
          Deprecated. No replacement.
 javax.management.ObjectName getObjectName()
          Get MBean ObjectName.
 StatDescriptor getStatDescriptor()
          Deprecated. No replacement.
 void setEnabled(int[] enabled)
          Set statistics that needs to be enabled.
 java.lang.String toString()
          Returns a String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_STATISTICS

public static final int ALL_STATISTICS
Indicate all statistics that available for the given MBean

See Also:
Constant Field Values
Constructor Detail

MBeanLevelSpec

public MBeanLevelSpec(javax.management.ObjectName mName,
                      int level)
Deprecated. As of 6.0, replaced by MBeanLevelSpec(ObjectName mName, int[] enable).

Parameters:
mName - should be a valid ObjectName (not null).
level - the instrumentation level. Level are defined in com.ibm.websphere.pmi.PmiConstants {LEVEL_NONE, LEVEL_LOW, LEVEL_MEDIUM, LEVEL_HIGH, LEVEL_MAX}.

MBeanLevelSpec

public MBeanLevelSpec(javax.management.ObjectName mName,
                      StatDescriptor sd,
                      int level)
Deprecated. As of 6.0, replaced by MBeanLevelSpec(ObjectName mName, int[] enable).

Parameters:
mName - should be a valid ObjectName (not null).
sd - an optional StatDescriptor (could be null).
level - the instrumentation level for it.

MBeanLevelSpec

public MBeanLevelSpec(javax.management.ObjectName mName,
                      int[] enable)
Constructs a monitoring specification to selectively enable statistics.

Parameters:
mName - A valid MBean ObjectName (not null) for which statistics needs to be enabled.
enable - List of statistic ID that needs be enabled. Only the statistics specified in this list will be enabled and the statistics that are not specified in this list will be disabled.
Use new int[MBeanLevelSpec.ALL_STATISTICS] to enable all the statistics that are available for this MBean and new int[0] to disable all statistics.
Method Detail

setEnabled

public void setEnabled(int[] enabled)
Set statistics that needs to be enabled.

Parameters:
enabled - List of statistic ID that needs be enabled. Only the statistics specified in this list will be enabled and the statistics that are not specified in this list will be disabled.
Use new int[MBeanLevelSpec.ALL_STATISTICS] to enable all the statistics and new int[0] to disable all statistics.

getObjectName

public javax.management.ObjectName getObjectName()
Get MBean ObjectName.

Returns:
MBean ObjectName

getStatDescriptor

public StatDescriptor getStatDescriptor()
Deprecated. No replacement.

Get StatDescriptor.


getLevel

public int getLevel()
Deprecated. No replacement.

Get PMI monitoring level.


getEnabled

public int[] getEnabled()
Get the list of statistics that are enabled. MBeanLevelSpec.ALL_STATISTICS indicate all statistics are enabled and new int[0] to disable all statistics.


toString

public java.lang.String toString()
Returns a String representation.

Overrides:
toString in class java.lang.Object

IBM WebSphere Application ServerTM
Release 7