// Not in the spec but needed
private void removeAttributeChangeNotificationListener(NotificationListener listener, String attributeName, Object handback) throws MBeanException, RuntimeOperationsException, ListenerNotFoundException
{
if (listener == null) throw new ListenerNotFoundException("listener is null");
AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
if (attributeName != null)
{
if (m_modelMBeanInfo.getAttribute(attributeName) == null) throw new RuntimeOperationsException(new IllegalArgumentException("No attribute named " + attributeName));
filter.enableAttribute(attributeName);
}
else
{
MBeanAttributeInfo[] ai = m_modelMBeanInfo.getAttributes();
for (int i = 0; i < ai.length; i++)
{
Descriptor d = ((ModelMBeanAttributeInfo)ai[i]).getDescriptor();
filter.enableAttribute((String)d.getFieldValue("name"));
}
}
getAttributeChangeBroadcaster().removeNotificationListener(listener, filter, handback);