public static void listHandlers ( List < IMonitoringHandler > handlers , Logger logger ) { if ( handlers . isEmpty ( ) ) { logger . info ( "No monitoring handler was found." ) ; } else { StringBuilder sb = new StringBuilder ( "Available monitoring handlers: " ) ; for ( Iterator < IMonitoringHandler > it = handlers . iterator ( ) ; it . hasNext ( ) ; ) { sb . append ( it . next ( ) . getName ( ) ) ; if ( it . hasNext ( ) ) sb . append ( ", " ) ; } sb . append ( "." ) ; logger . info ( sb . toString ( ) ) ; } }
This method lists the available handlers and logs them .