javax.slee.management
Interface ResourceUsageMBean


public interface ResourceUsageMBean

The ResourceUsageMBean interface defines resource adaptor usage-related management operations. Using a ResourceUsageMBean object a management client may get access to UsageMBean objects for a resource adaptor entity, or modify the list of named usage parameter sets a resource adaptor entity is allowed to use.

The base JMX Object Name of a ResourceUsageMBean object is specified by the BASE_OBJECT_NAME constant. The RESOURCE_ADAPTOR_ENTITY_NAME_KEY constant defines an additional Object Name property that uniquely identifies a Resource Usage MBean. The complete Object Name of a ResourceUsageMBean object can be obtained by a management client via the ResourceManagementMBean.getResourceUsageMBean(java.lang.String) method.

Since:
SLEE 1.1

Field Summary
static java.lang.String BASE_OBJECT_NAME
          The base JMX Object Name string of all SLEE Resource Usage MBeans.
static java.lang.String RESOURCE_ADAPTOR_ENTITY_NAME_KEY
          The JMX Object Name property key that identifies the name of the resource adaptor entity that the Resource Usage MBean is providing usage-related management operations for.
 
Method Summary
 void close()
          Notify the SLEE that the Resource Usage MBean is no longer required by the management client.
 void createUsageParameterSet(java.lang.String paramSetName)
          Create a new usage parameter set that the resource adaptor entity that this MBean is providing usage management access for is permitted to use in the ResourceAdaptorContext.getUsageParameterSet(java.lang.String) method.
 java.lang.String getEntityName()
          Get the name of the resource adaptor entity that this MBean provides usage management access for.
 javax.management.ObjectName getUsageMBean()
          Get the JMX Object Name of a UsageMBean object that provides management access to the unnamed usage parameter set for the resource adaptor entity that this MBean is providing usage management access for.
 javax.management.ObjectName getUsageMBean(java.lang.String paramSetName)
          Get the JMX Object Name of a UsageMBean object that provides management access to the named usage parameter set for the resource adaptor entity that this MBean is providing usage management access for.
 javax.management.ObjectName getUsageNotificationManagerMBean()
          Get the JMX Object Name of a UsageNotificationManagerMBean that provides management access to the usage notification manager for the resource adaptor entity that this MBean is providing usage management access for.
 java.lang.String[] getUsageParameterSets()
          Get the names of the usage parameter sets that have been created for the resource adaptor entity that this MBean is providing usage management access for.
 void removeUsageParameterSet(java.lang.String paramSetName)
          Remove an existing usage parameter set from the resource adaptor entity that this MBean is providing usage management access for.
 void resetAllUsageParameters()
          Reset all usage parameters in the unamed usage parameter set, and all named usage parameter sets, of the resource adaptor entity that this MBean is providing usage management access for.
 

Field Detail

BASE_OBJECT_NAME

static final java.lang.String BASE_OBJECT_NAME
The base JMX Object Name string of all SLEE Resource Usage MBeans. This string is equal to "javax.slee.management.usage:type=ResourceUsage" and the string BASE_OBJECT_NAME + ",*" defines a JMX Object Name property pattern which matches with all Resource Usage MBeans that are registered with the MBean Server. A Resource Usage MBean is registered with the MBean Server using this base name in conjunction with properties whose keys are specified by the RESOURCE_ADAPTOR_ENTITY_NAME_KEY constant.

See Also:
Constant Field Values

RESOURCE_ADAPTOR_ENTITY_NAME_KEY

static final java.lang.String RESOURCE_ADAPTOR_ENTITY_NAME_KEY
The JMX Object Name property key that identifies the name of the resource adaptor entity that the Resource Usage MBean is providing usage-related management operations for. This key is equal to the string "raEntityName".

See Also:
Constant Field Values
Method Detail

getEntityName

java.lang.String getEntityName()
                               throws ManagementException
Get the name of the resource adaptor entity that this MBean provides usage management access for.

Returns:
the name of the resource adaptor entity.
Throws:
ManagementException - if the resource adaptor entity name could not be obtained due to a system-level failure.

createUsageParameterSet

void createUsageParameterSet(java.lang.String paramSetName)
                             throws java.lang.NullPointerException,
                                    InvalidArgumentException,
                                    UsageParameterSetNameAlreadyExistsException,
                                    ManagementException
Create a new usage parameter set that the resource adaptor entity that this MBean is providing usage management access for is permitted to use in the ResourceAdaptorContext.getUsageParameterSet(java.lang.String) method.

Parameters:
paramSetName - the usage parameter set name. Names must be non-null and greater than 0 in length.
Throws:
java.lang.NullPointerException - if paramSetName is null.
InvalidArgumentException - if paramSetName is zero-length.
UsageParameterSetNameAlreadyExistsException - if the name has already been used to create a usage parameter set for the resource adaptor entity.
ManagementException - if the usage parameter set could not be created due to a system-level failure.

removeUsageParameterSet

void removeUsageParameterSet(java.lang.String paramSetName)
                             throws java.lang.NullPointerException,
                                    UnrecognizedUsageParameterSetNameException,
                                    ManagementException
Remove an existing usage parameter set from the resource adaptor entity that this MBean is providing usage management access for.

Parameters:
paramSetName - the usage parameter set name.
Throws:
java.lang.NullPointerException - if paramSetName is null.
UnrecognizedUsageParameterSetNameException - if the name does not identify a usage parameter set that has been created for the resource adaptor entity.
ManagementException - if the name could not be removed due to a system-level failure.

getUsageParameterSets

java.lang.String[] getUsageParameterSets()
                                         throws ManagementException
Get the names of the usage parameter sets that have been created for the resource adaptor entity that this MBean is providing usage management access for.

Returns:
the names of the usage parameter sets.
Throws:
ManagementException - if the names could not be obtained due to a system-level failure.

getUsageMBean

javax.management.ObjectName getUsageMBean()
                                          throws ManagementException
Get the JMX Object Name of a UsageMBean object that provides management access to the unnamed usage parameter set for the resource adaptor entity that this MBean is providing usage management access for.

Returns:
the Object Name of a UsageMBean object for the unnamed usage parameter set for the resource adaptor entity.
Throws:
ManagementException - if the Object Name could not be obtained due to a system-level failure.

getUsageMBean

javax.management.ObjectName getUsageMBean(java.lang.String paramSetName)
                                          throws java.lang.NullPointerException,
                                                 UnrecognizedUsageParameterSetNameException,
                                                 ManagementException
Get the JMX Object Name of a UsageMBean object that provides management access to the named usage parameter set for the resource adaptor entity that this MBean is providing usage management access for.

Parameters:
paramSetName - the name of the usage parameter set. The name must be one of the names returned by getUsageParameterSets().
Returns:
the Object Name of a UsageMBean object for the named usage parameter set for the resource adaptor entity.
Throws:
java.lang.NullPointerException - if paramSetName is null.
UnrecognizedUsageParameterSetNameException - if the named usage parameter set has not been created for the resource adaptor entity.
ManagementException - if the Object Name could not be obtained due to a system-level failure.

getUsageNotificationManagerMBean

javax.management.ObjectName getUsageNotificationManagerMBean()
                                                             throws ManagementException
Get the JMX Object Name of a UsageNotificationManagerMBean that provides management access to the usage notification manager for the resource adaptor entity that this MBean is providing usage management access for.

Throws:
ManagementException - if the Object Name could not be obtained due to a system-level failure.

resetAllUsageParameters

void resetAllUsageParameters()
                             throws ManagementException
Reset all usage parameters in the unamed usage parameter set, and all named usage parameter sets, of the resource adaptor entity that this MBean is providing usage management access for. Counter-type usage parameters are reset to 0 and sample-type usage parameters have all samples cleared.

Throws:
ManagementException - if the values of the usage parameters could not be reset due to a system-level failure.

close

void close()
           throws ManagementException
Notify the SLEE that the Resource Usage MBean is no longer required by the management client. As the SLEE may subsequently deregister this MBean from the MBean server, a client that invokes this method should assume that the Object Name they had for the MBean is no longer valid once this method returns.

Throws:
ManagementException - if the Resource Usage MBean could not be closed by the SLEE due to a system-level failure.


Copyright © 2008. All Rights Reserved.