public void addEventListeners(MBeanServer server,Map<String,Map<String,Object>> descriptor){
  for (  Map.Entry<String,Map<String,Object>> item : descriptor.entrySet()) {
    Map<String,Object> listener=item.getValue();
    ObjectName broadcaster=(ObjectName)listener.get("from");
    try {
      String eventType=(String)listener.get("event");
      if (eventType != null) {
        NotificationFilterSupport filter=new NotificationFilterSupport();
        filter.enableType(eventType);
        server.addNotificationListener(broadcaster,JmxEventListener.getListener(),filter,listener);
      }
 else {
        server.addNotificationListener(broadcaster,JmxEventListener.getListener(),null,listener);
      }
    }
 catch (    InstanceNotFoundException e) {
      throw new JmxBuilderException(e);
    }
  }
}

public void addEventListeners ( MBeanServer server , Map < String , Map < String , Object > > descriptor ) { for ( Map . Entry < String , Map < String , Object > > item : descriptor . entrySet ( ) ) { Map < String , Object > listener = item . getValue ( ) ; ObjectName broadcaster = ( ObjectName ) listener . get ( "from" ) ; try { String eventType = ( String ) listener . get ( "event" ) ; if ( eventType != null ) { NotificationFilterSupport filter = new NotificationFilterSupport ( ) ; filter . enableType ( eventType ) ; server . addNotificationListener ( broadcaster , JmxEventListener . getListener ( ) , filter , listener ) ; } else { server . addNotificationListener ( broadcaster , JmxEventListener . getListener ( ) , null , listener ) ; } } catch ( InstanceNotFoundException e ) { throw new JmxBuilderException ( e ) ; } } }
sets up event listeners for this mbean as described in the descriptor . the descriptor contains a map with layout { item - > map [ event : " . . . " , from : objectname , callback : & amp ; closure ] , . . . , }
