public static class RemoteUsage.UsageReader extends Object
This class can be instantiated directly by a client if an ObjectName reference has already been obtained, but is normally created and returned by calling on of the following methods (or the equivalent method for the unnamed parameter set):
RemoteUsage.Subsystems.getUsageReader(javax.management.MBeanServerConnection, String, String)
RemoteUsage.Sbbs.getUsageReader(javax.management.MBeanServerConnection, javax.slee.ServiceID, javax.slee.SbbID, String)
RemoteUsage.Profiles.getUsageReader(javax.management.MBeanServerConnection, String, String)
RemoteUsage.Resources.getUsageReader(javax.management.MBeanServerConnection, String, String)
Constructor and Description |
---|
RemoteUsage.UsageReader(MBeanServerConnection server,
ObjectName objectName)
Create an instance of UsageReader.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the Usage MBean.
|
long |
getCounterValue(String name,
boolean reset)
Get the value of a counter usage parameter.
|
int |
getParameterCount()
Get the number of usage parameters.
|
SampleStatistics |
getSampleStatistics(String name,
boolean reset)
Get the value of a sample usage parameter.
|
boolean |
isCounter(String name)
Check whether a usage parameter is a counter.
|
boolean |
isSample(String name)
Check whether a usage parameter is a sample statistic.
|
Iterator |
nameIterator()
Get an iterator of the usage parameter names.
|
public RemoteUsage.UsageReader(MBeanServerConnection server, ObjectName objectName) throws ManagementException
server
- a server connectionobjectName
- the objectName of the Usage MBeanManagementException
public int getParameterCount() throws ManagementException
ManagementException
public Iterator nameIterator() throws ManagementException
ManagementException
public boolean isSample(String name)
name
- usage parameter namepublic boolean isCounter(String name)
name
- usage parameter namepublic long getCounterValue(String name, boolean reset) throws ManagementException
name
- usage parameter namereset
- if true, counter will be reset to zeroManagementException
public SampleStatistics getSampleStatistics(String name, boolean reset) throws ManagementException
name
- usage parameter namereset
- if true, sample will be resetManagementException
public void close() throws ManagementException
ManagementException
- if any problem occurs closing the MBean