UsageMBean
interface,
which specifies the source of the usage information using a generic
NotificationSource
object. However, to ensure backward
compatibility, a UsageMBean
object that is created by the SLEE for an
SBB installed using a SLEE 1.0 deployment descriptor (as determined by the deployment
descriptor's DOCTYPE
declaration) must continue to implement this interface
as well as the UsageMBean
interface of SLEE 1.1.public interface SbbUsageMBean
SbbUsageMBean
interface must be implemented by an 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:
public long get<usage-parameter-name>(boolean reset) throws ManagementException;
Each sample-type usage parameter causes the addition of a managed operation with the following signature:
public SampleStatistics get<usage-parameter-name>(boolean reset) throws ManagementException;
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.
Modifier and Type | Field and Description |
---|---|
static String |
USAGE_NOTIFICATION_TYPE
Deprecated.
Usage notification types are specified by the various classes that
implement
NotificationSource
and refenced by a UsageMBean (which replaces this interface). |
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Replaced with
UsageMBean.close() . |
SbbID |
getSbb()
Deprecated.
Replaced with a
UsageMBean containing an
SbbNotification as a notification source. |
ServiceID |
getService()
Deprecated.
Replaced with a
UsageMBean containing an
SbbNotification as a notification source. |
String |
getUsageParameterSet()
Deprecated.
Replaced with
UsageMBean.getUsageParameterSet() . |
void |
resetAllUsageParameters()
Deprecated.
Replaced with
UsageMBean.resetAllUsageParameters() . |
static final String USAGE_NOTIFICATION_TYPE
NotificationSource
and refenced by a UsageMBean
(which replaces this interface).ServiceID getService() throws ManagementException
ManagementException
- if the Service component identifier could not be
obtained due to a system-level failure.SbbID getSbb() throws ManagementException
ManagementException
- if the SBB component identifier could not be
obtained due to a system-level failure.String getUsageParameterSet() throws ManagementException
UsageMBean.getUsageParameterSet()
.null
if this MBean is presenting usage
information for the SBB's default usage parameter set.ManagementException
- if the SBB usage parameter set name could not be
obtained due to a system-level failure.void close() throws InvalidStateException, ManagementException
UsageMBean.close()
.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.void resetAllUsageParameters() throws ManagementException
UsageMBean.resetAllUsageParameters()
.ManagementException
- if the values of the usage parameters could not be
reset due to a system-level failure.