public class ListConsumer<T> extends AbstractConsumer<T,List<T>>
Consumer that obains a List
from a Producer and returns the elements one by one. This implementation
is not thread-safe.producer| Constructor and Description |
|---|
ListConsumer(Producer<List<T>> producer) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkConsumed()
Implement this method to actualy check for the
Producer being fully
consumed without worrying about it being closed or throwing any exceptions |
void |
close()
Closes the resource.
|
protected T |
doConsume()
Implement this method to actually consume the producer without worrying about
exception types or checking fo this consumer to be closed.
|
int |
size()
returns the total amount of items available for storage/processing.
|
consume, isConsumedprotected T doConsume() throws NoSuchElementException
nulldoConsume in class AbstractConsumer<T,List<T>>nullNoSuchElementExceptionprotected boolean checkConsumed()
AbstractConsumerProducer being fully
consumed without worrying about it being closed or throwing any exceptionscheckConsumed in class AbstractConsumer<T,List<T>>Producer has been consumed or notpublic int size()
size in interface ProvidesTotalHintsize in class AbstractConsumer<T,List<T>>public void close()
throws MuleException
close in interface Closeableclose in class AbstractConsumer<T,List<T>>MuleException - if an exception occurs closing the resourceCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.