javax.slee.usage
Interface SbbUsageMBean


public interface SbbUsageMBean

The SbbUsageMBean interface must be implemented by a SBB Usage MBean Class generated by the SLEE. This interface contains functionality that provides basic management of an SBB's usage parameters. The Object Name of a SbbUsageMBean object can be obtained by a management client by invoking one of the getSbbUsageMBean methods on a ServiceUsageMBean object.

Interface extension
During SBB deployment the SbbUsageMBean interface is extended to provide access to the usage parameters defined by the SBB. Each counter-type usage parameter causes the addition of a managed operation with the following signature:

Each sample-type usage parameter causes the addition of a managed operation with the following signature:

In each operation, usage-parameter-name is the name of the usage parameter, with the first letter capitalized. The reset parameter taken by each operation is used to optionally reset the usage parameter value after the return result has been obtained.

Notifications
Since SbbUsageMBean objects can emit Usage notifications, it is required that a SbbUsageMBean object implement the javax.management.NotificationBroadcaster interface.


Field Summary
static java.lang.String USAGE_NOTIFICATION_TYPE
          The notification type of usage notifications emitted by this MBean.
 
Method Summary
 void close()
          Notify the SLEE that the SBB usage MBean is no longer required by the management client.
 SbbID getSbb()
          Get the component identifier of the SBB that this MBean is presenting usage information for.
 ServiceID getService()
          Get the component identifier of the Service containing the SBB that this MBean is presenting usage information for.
 java.lang.String getUsageParameterSet()
          Get the name of the SBB usage parameter set that this MBean is presenting usage information for.
 void resetAllUsageParameters()
          Reset all SBB usage parameters in the usage parameter set managed by this MBean.
 

Field Detail

USAGE_NOTIFICATION_TYPE

public static final java.lang.String USAGE_NOTIFICATION_TYPE
The notification type of usage notifications emitted by this MBean. The usage notification type is equal to the string "javax.slee.management.usage".
Method Detail

getService

public ServiceID getService()
                     throws ManagementException
Get the component identifier of the Service containing the SBB that this MBean is presenting usage information for.
Returns:
the component identifier of the Service containing the SBB that this MBean is presenting usage information for.
Throws:
ManagementException - if the Service component identifier could not be obtained due to a system-level failure.

getSbb

public SbbID getSbb()
             throws ManagementException
Get the component identifier of the SBB that this MBean is presenting usage information for.
Returns:
the component identifier of the SBB that this MBean is presenting usage information for.
Throws:
ManagementException - if the SBB component identifier could not be obtained due to a system-level failure.

getUsageParameterSet

public java.lang.String getUsageParameterSet()
                                      throws ManagementException
Get the name of the SBB usage parameter set that this MBean is presenting usage information for.
Returns:
the name of the SBB usage parameter set that this MBean is presenting usage information for, or null if this MBean is presenting usage information for the SBB's default usage parameter set.
Throws:
ManagementException - if the SBB usage parameter set name could not be obtained due to a system-level failure.

close

public void close()
           throws InvalidStateException,
                  ManagementException
Notify the SLEE that the SBB usage MBean is no longer required by the management client. As the SLEE may subsequently deregister the usage 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:
InvalidStateException - if notification listeners are still attached to the sbb usage MBean.
ManagementException - if the SBB usage MBean could not be closed by the SLEE due to a system-level failure.

resetAllUsageParameters

public void resetAllUsageParameters()
                             throws ManagementException
Reset all SBB usage parameters in the usage parameter set managed by this MBean. 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.