ObjectName pObjectNameToFilter) {
MBeanServerNotificationFilter filter = new MBeanServerNotificationFilter();
if (pObjectNameToFilter == null) {
filter.enableAllObjectNames();
} else {
filter.enableObjectName(pObjectNameToFilter);
}
try {
pServer.addNotificationListener(getMBeanServerDelegateName(), pListener, filter, null);
} catch (InstanceNotFoundException e) {
throw new IllegalStateException("Cannot find " + getMBeanServerDelegateName() + " in server " + pServer,e);