public void handleNotification(Notification notification,Object handback){
  String notifyType=notification.getType();
  if (notifyType.equals(GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION)) {
    CompositeData cd=(CompositeData)notification.getUserData();
    GarbageCollectionNotificationInfo gcNotifyInfo=GarbageCollectionNotificationInfo.from(cd);
    monitor(gcNotifyInfo);
    if (!gcNames.contains(gcNotifyInfo.getGcName())) {
      registerDependentGcMbeans(gcNotifyInfo.getGcName());
    }
  }
}

public void handleNotification ( Notification notification , Object handback ) { String notifyType = notification . getType ( ) ; if ( notifyType . equals ( GarbageCollectionNotificationInfo . GARBAGE_COLLECTION_NOTIFICATION ) ) { CompositeData cd = ( CompositeData ) notification . getUserData ( ) ; GarbageCollectionNotificationInfo gcNotifyInfo = GarbageCollectionNotificationInfo . from ( cd ) ; monitor ( gcNotifyInfo ) ; if ( ! gcNames . contains ( gcNotifyInfo . getGcName ( ) ) ) { registerDependentGcMbeans ( gcNotifyInfo . getGcName ( ) ) ; } } }
this is called automatically when a gc is fired
