|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.streaming.CompositeProducer<T>
public class CompositeProducer<T>
Implementation of 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 Summary | |
---|---|
CompositeProducer(List<Producer<T>> producers)
Takes a list of producers to be composited. |
|
CompositeProducer(Producer<T>... producers)
|
Method Summary | |
---|---|
void |
close()
Closes all the producers |
T |
produce()
Returns the next available item |
int |
size()
Accumulates the total available count of all the producers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeProducer(List<Producer<T>> producers)
producers
- a list of Producer
public CompositeProducer(Producer<T>... producers)
Method Detail |
---|
public T produce()
null. This method does not close any producer when it is
exhausted. Use the close method for that
- Specified by:
produce
in interface Producer<T>
- Returns:
- an item. Might be
null
public int size()
size
in interface ProvidesTotalHint
public void close() throws MuleException
close
in interface Closeable
MuleException
- if an exception occurs closing the resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |