public static class RemoteUsage.UsageNotificationManager 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:
RemoteUsage.Subsystems.getUsageNotificationManager(javax.management.MBeanServerConnection, String)
RemoteUsage.Sbbs.getUsageNotificationManager(javax.management.MBeanServerConnection, javax.slee.ServiceID, javax.slee.SbbID)
RemoteUsage.Profiles.getUsageNotificationManager(javax.management.MBeanServerConnection, String)
RemoteUsage.Resources.getUsageNotificationManager(javax.management.MBeanServerConnection, String)
Constructor and Description |
---|
RemoteUsage.UsageNotificationManager(MBeanServerConnection server,
ObjectName objectName)
Create a usage notification manager.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the Usage Notification Manager MBean.
|
boolean |
getNotificationsEnabled(String name)
Determine whether notifications are enabled for a usage parameter.
|
int |
getParameterCount()
Get the number of usage parameter names available to have notifications enabled.
|
String |
getUsageParametersInterfaceType()
Get the usage parameters interface type.
|
Iterator |
nameIterator()
Get an iterator of the usage parameter names available to have notifications enabled.
|
void |
setNotificationsEnabled(String name,
boolean enabled)
Enable notifications for a usage parameter.
|
public RemoteUsage.UsageNotificationManager(MBeanServerConnection server, ObjectName objectName) throws ManagementException
server
- a server connectionobjectName
- the objectName of the Usage Notification MBeanManagementException
public String getUsageParametersInterfaceType()
This method only returns a non-null value if the usage parameters interface was declared using the Rhino extension mechanism.
null
if the usage
parameters interface was declared using the standard SLEE mechanism.public int getParameterCount() throws ManagementException
ManagementException
public Iterator nameIterator() throws ManagementException
ManagementException
public boolean getNotificationsEnabled(String name) throws ManagementException
UsageNotificationManager
:
server.getAttribute(objectName, name + "NotificationsEnabled");
name
- the name of the usage parameter to testManagementException
- if any problem occurs invoking getAttribute on the MBean serverpublic void setNotificationsEnabled(String name, boolean enabled) throws ManagementException
UsageNotificationManager
:
server.setAttribute(objectName, new Attribute(name + "NotificationsEnabled", enabled));
name
- the name of the usage parameter to enable/disable notifications forenabled
- true - enabled, false - disabledManagementException
- if any problem occurs invoking setAttribute on the MBean serverpublic void close() throws ManagementException
ManagementException
- if any problem occurs closing the MBean