Methods Summary |
---|
public javax.management.ObjectName | createNotificationService(java.lang.Object userData, int bufferSize)
final NotificationServiceImpl service =
new NotificationServiceImpl( userData, bufferSize );
final ObjectName self = getObjectName();
final String domain = self.getDomain();
final String childName = mUniqueIDs.createID().toString();
final String requiredProps =
Util.makeRequiredProps( XTypes.NOTIFICATION_SERVICE, childName );
final ObjectName tempName = JMXUtil.newObjectName( domain, requiredProps );
ObjectName objectName = null;
try
{
objectName = registerMBean( service, tempName );
mServices.put( objectName, service );
}
catch( Exception e )
{
throw new RuntimeException( e );
}
return( objectName );
|
public java.lang.String | getGroup()
return( AMX.GROUP_UTILITY );
|
public javax.management.ObjectName | getNotificationServiceObjectName(java.lang.String name)
return( getContaineeObjectName( XTypes.NOTIFICATION_SERVICE, name ) );
|
public void | handleNotification(javax.management.Notification notifIn, java.lang.Object handback)
final String type = notifIn.getType();
// ensure that if a NotificationService is unregistered that we remove
// it from our list
if ( type.equals( MBeanServerNotification.UNREGISTRATION_NOTIFICATION) )
{
final MBeanServerNotification notif = (MBeanServerNotification)notifIn;
final ObjectName objectName = notif.getMBeanName();
if ( Util.getJ2EEType( objectName ).
equals( XTypes.NOTIFICATION_SERVICE ) )
{
mServices.remove( objectName );
}
}
|
public void | preRegisterDone()
JMXUtil.listenToMBeanServerDelegate( getMBeanServer(), this, null, null );
|
public synchronized void | removeNotificationService(java.lang.String name)
final ObjectName objectName = getNotificationServiceObjectName( name );
if ( objectName == null )
{
throw new IllegalArgumentException( name );
}
if ( ! mServices.containsKey( objectName ) )
{
throw new InstanceNotFoundException( objectName.toString() );
}
try
{
getMBeanServer().unregisterMBean( objectName );
}
catch( MBeanRegistrationException e )
{
throw new RuntimeException( e );
}
// remove it after unregistering it, in case an exception is thrown
mServices.remove( objectName );
|