public class JmsBlockingQueue
extends java.util.AbstractQueue
implements java.util.concurrent.BlockingQueue
Constructor and Description |
---|
JmsBlockingQueue() |
JmsBlockingQueue(ConnectionFactory factory,
Destination destination) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
contains(java.lang.Object obj) |
int |
drainTo(java.util.Collection c) |
int |
drainTo(java.util.Collection c,
int max) |
protected MessageConsumer |
getReadConsumer() |
protected MessageProducer |
getWriteProducer() |
void |
init() |
java.util.Iterator |
iterator() |
boolean |
offer(java.lang.Object value) |
boolean |
offer(java.lang.Object value,
long timeout,
java.util.concurrent.TimeUnit unit)
Adds the item to the queue, waiting if necessary
|
java.lang.Object |
peek() |
java.lang.Object |
poll() |
java.lang.Object |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
put(java.lang.Object value) |
int |
remainingCapacity() |
boolean |
remove(java.lang.Object obj) |
void |
setDestination(Destination destination) |
void |
setFactory(ConnectionFactory factory) |
int |
size() |
java.lang.Object |
take() |
java.lang.String |
toString() |
containsAll, isEmpty, removeAll, retainAll, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public JmsBlockingQueue()
public JmsBlockingQueue(ConnectionFactory factory, Destination destination)
public void setFactory(ConnectionFactory factory)
public void setDestination(Destination destination)
@PostConstruct public void init()
public int size()
size
in interface java.util.Collection
size
in class java.util.AbstractCollection
public boolean contains(java.lang.Object obj)
contains
in interface java.util.Collection
contains
in interface java.util.concurrent.BlockingQueue
contains
in class java.util.AbstractCollection
public boolean remove(java.lang.Object obj)
remove
in interface java.util.Collection
remove
in interface java.util.concurrent.BlockingQueue
remove
in class java.util.AbstractCollection
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in class java.util.AbstractCollection
public boolean offer(java.lang.Object value, long timeout, java.util.concurrent.TimeUnit unit)
offer
in interface java.util.concurrent.BlockingQueue
public java.lang.Object poll(long timeout, java.util.concurrent.TimeUnit unit)
poll
in interface java.util.concurrent.BlockingQueue
public boolean offer(java.lang.Object value)
offer
in interface java.util.concurrent.BlockingQueue
offer
in interface java.util.Queue
public void put(java.lang.Object value)
put
in interface java.util.concurrent.BlockingQueue
public int remainingCapacity()
remainingCapacity
in interface java.util.concurrent.BlockingQueue
public java.lang.Object peek()
peek
in interface java.util.Queue
public java.lang.Object poll()
poll
in interface java.util.Queue
public java.lang.Object take()
take
in interface java.util.concurrent.BlockingQueue
public int drainTo(java.util.Collection c)
drainTo
in interface java.util.concurrent.BlockingQueue
public int drainTo(java.util.Collection c, int max)
drainTo
in interface java.util.concurrent.BlockingQueue
protected MessageProducer getWriteProducer() throws JMSException
JMSException
protected MessageConsumer getReadConsumer() throws JMSException
JMSException
public void close()
public java.lang.String toString()
toString
in class java.util.AbstractCollection