public void addReportableObserver ( final ReportableObserver reportableObserver ) { reportableObservers . add ( reportableObserver ) ; LOGGER . info ( "registering new ReportableObserver (" + reportableObserver . getClass ( ) . getName ( ) + ")" ) ; // iterate over all reportables that are registered already and call the observer for each one of them reportInto ( new ReportVisitor ( ) { public void notifyReportableObserver ( Reportable reportable ) { reportableObserver . addNewReportable ( reportable ) ; } @ Override public void reportCounter ( Counter counter ) { notifyReportableObserver ( counter ) ; } @ Override public void reportTimer ( Timer timer ) { notifyReportableObserver ( timer ) ; } @ Override public void reportStateValue ( StateValueProvider stateValueProvider ) { notifyReportableObserver ( stateValueProvider ) ; } @ Override public void reportMultiValue ( MultiValueProvider multiValueProvider ) { notifyReportableObserver ( multiValueProvider ) ; } @ Override public void reportHistorizableList ( HistorizableList historizableList ) { notifyReportableObserver ( historizableList ) ; } @ Override public void reportVersion ( Version version ) { notifyReportableObserver ( version ) ; } } ) ; }
adds a new ReportableObserver that wants to be notified about new Reportables that are registered on the InApplicationMonitor