public static void listTargets ( List < TargetHandler > targetHandlers , Logger logger ) { if ( targetHandlers . isEmpty ( ) ) { logger . info ( "No target was found for Roboconf's DM." ) ; } else { StringBuilder sb = new StringBuilder ( "Available target in Roboconf's DM: " ) ; for ( Iterator < TargetHandler > it = targetHandlers . iterator ( ) ; it . hasNext ( ) ; ) { sb . append ( it . next ( ) . getTargetId ( ) ) ; if ( it . hasNext ( ) ) sb . append ( ", " ) ; } sb . append ( "." ) ; logger . info ( sb . toString ( ) ) ; } }
This method lists the available target and logs them .