public void addNotfication ( Notification notification ) { Object source = notification . getSource ( ) ; NotificationRecord nr ; if ( source instanceof ObjectName ) { nr = new NotificationRecord ( notification , ( ObjectName ) source ) ; } else { nr = new NotificationRecord ( notification , ( source != null ) ? source . toString ( ) : null ) ; } addNotficationRecord ( nr ) ; }
This method will be called by the NotificationListener once the MBeanServer pushes a notification .