public void handleNotification ( Notification notification , Object handback ) { Map event = ( Map ) handback ; if ( event != null ) { Object del = event . get ( "managedObject" ) ; Object callback = event . get ( "callback" ) ; if ( callback != null && callback instanceof Closure ) { Closure closure = ( Closure ) callback ; closure . setDelegate ( del ) ; if ( closure . getMaximumNumberOfParameters ( ) == 1 ) closure . call ( buildOperationNotificationPacket ( notification ) ) ; else closure . call ( ) ; } } }
This is the implemented method for NotificationListener . It is called by an event emitter to dispatch JMX events to listeners . Here it handles internal JmxBuilder events .