|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.streaming.QueueProducer<T>
public class QueueProducer<T>
Implementation of Producer
to stream the contents of a
Queue
A polling timeout value might be specified,
otherwise the default value of 5000 milliseconds will be assumed
Constructor Summary | |
---|---|
QueueProducer(Queue queue)
Creates an instance with 5000 milliseconds as the default polling value |
|
QueueProducer(Queue queue,
long timeout)
|
Method Summary | |
---|---|
void |
close()
Closes the resource. |
T |
produce()
Returns the next available item |
int |
size()
returns the total amount of items available for storage/processing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueueProducer(Queue queue)
queue
- the queue to stream frompublic QueueProducer(Queue queue, long timeout)
Method Detail |
---|
public T produce()
null
is returned. If the poll method throws
InterruptedException
then null
is returned as well
produce
in interface Producer<T>
null
public void close() throws MuleException
Closeable
close
in interface Closeable
MuleException
- if an exception occurs closing the resourcepublic int size()
ProvidesTotalHint
size
in interface ProvidesTotalHint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |