public List < ChannelInformation > listChannels ( ) { LinkedList < ChannelInformation > entries = new LinkedList < ChannelInformation > ( ) ; Collection < Broadcaster > broadcasters = BroadcasterFactory . getDefault ( ) . lookupAll ( ) ; String name ; for ( Broadcaster broadcaster : broadcasters ) { if ( broadcaster instanceof BounceProxyBroadcaster ) { name = ( ( BounceProxyBroadcaster ) broadcaster ) . getName ( ) ; } else { name = broadcaster . getClass ( ) . getSimpleName ( ) ; } Integer cachedSize = null ; entries . add ( new ChannelInformation ( name , broadcaster . getAtmosphereResources ( ) . size ( ) , cachedSize ) ) ; } return entries ; }
Gets a list of all channel information .