public class CompositeProducer<T> extends Object implements Producer<T>
Producer to expose streams from several producers as a single data feed. Producers are consumed in
order until they're all consumed. All producers need to share the same generic type T| Constructor and Description |
|---|
CompositeProducer(List<Producer<T>> producers)
Takes a list of producers to be composited.
|
CompositeProducer(Producer<T>... producers) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes all the producers
|
int |
getSize()
Accumulates the total available count of all the producers.
|
T |
produce()
Returns the next available item
|
public CompositeProducer(List<Producer<T>> producers)
producers - a list of Producerpublic T produce()
null. This method does not close any
producer when it is exhausted. Use the close method for that public int getSize()
getSize in interface org.mule.runtime.api.streaming.HasSizepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.