public class QueueProducer<T> extends Object implements Producer<T>
| Constructor and Description |
|---|
QueueProducer(Queue queue)
Creates an instance with 5000 milliseconds as the default polling value
|
QueueProducer(Queue queue,
long timeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
getSize() |
T |
produce()
Returns the next available item
|
public QueueProducer(Queue queue)
queue - the queue to stream frompublic QueueProducer(Queue queue, long timeout)
public T produce()
null is returned. If the poll method throws
InterruptedException then null is returned as wellpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic int getSize()
getSize in interface org.mule.runtime.api.streaming.HasSizeCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.