protected List < ConsumerHolder > filterConsumersForClass ( Class < ? extends Consumer > consumerClass ) { List < ConsumerHolder > consumerHolderSubList = new LinkedList < ConsumerHolder > ( ) ; for ( ConsumerHolder consumerHolder : consumerHolders ) { if ( consumerClass . isAssignableFrom ( consumerHolder . getConsumer ( ) . getClass ( ) ) ) { consumerHolderSubList . add ( consumerHolder ) ; } } return consumerHolderSubList ; }
Filters the consumers being an instance extending or implementing the given class from the list of managed consumers .