|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractQueue<E>
com.caucho.jms.queue.AbstractDestination<E>
com.caucho.jms.queue.AbstractQueue<E>
public abstract class AbstractQueue<E>
Implements an abstract queue.
Constructor Summary | |
---|---|
protected |
AbstractQueue()
|
Method Summary | |
---|---|
void |
acknowledge(java.lang.String msgId)
Acknowledge receipt of the message. |
void |
addListenerException(java.lang.Exception e)
Called when a listener throws an excepton |
void |
addMessageCallback(MessageCallback<E> callback,
boolean isAutoAck)
Adds the callback to the listening list. |
void |
close()
|
int |
drainTo(java.util.Collection<? super E> c)
|
int |
drainTo(java.util.Collection<? super E> c,
int max)
|
java.util.ArrayList<? extends QueueEntry<E>> |
getBrowserList()
|
int |
getConsumerCount()
Returns the number of active message consumers |
long |
getListenerFailCountTotal()
Returns the number of listener failures. |
long |
getListenerFailLastTime()
Returns the number of listener failures. |
int |
getQueueSize()
Returns the queue size |
int |
getReceiverCount()
Returns the number of receivers. |
protected void |
init()
|
java.util.Iterator<E> |
iterator()
|
boolean |
offer(E message)
|
boolean |
offer(E message,
long timeout,
java.util.concurrent.TimeUnit unit)
Adds the item to the queue, waiting if necessary |
E |
peek()
|
E |
poll()
|
E |
poll(long timeout,
java.util.concurrent.TimeUnit unit)
|
void |
postConstruct()
|
void |
put(E value)
|
E |
receive(long expireTime,
boolean isAutoAcknowledge)
Receives a message, blocking until expireTime if no message is available. |
E |
receive(long expireTime,
boolean isAutoAcknowledge,
QueueEntrySelector selector)
|
void |
receive(long expireTime,
boolean isAutoAck,
QueueEntrySelector selector,
MessageCallback callback)
|
QueueEntry<E> |
receiveEntry(long expireTime,
boolean isAutoAck)
Primary message receiving, registers a callback for any new message. |
QueueEntry<E> |
receiveEntry(long expireTime,
boolean isAutoAck,
QueueEntrySelector selector)
|
int |
remainingCapacity()
|
void |
removeMessageCallback(MessageCallback<E> entryCallback)
Removes the callback from the listening list. |
void |
rollback(java.lang.String msgId)
Rollback the message read. |
void |
setQueueName(java.lang.String name)
|
int |
size()
|
E |
take()
|
Methods inherited from class com.caucho.jms.queue.AbstractDestination |
---|
generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getTopicName, getUrl, hasMessage, send, setName, setSerializationHandle, toString |
Methods inherited from class java.util.AbstractQueue |
---|
add, addAll, clear, element, remove |
Methods inherited from class java.util.AbstractCollection |
---|
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jms.Queue |
---|
getQueueName, toString |
Methods inherited from interface com.caucho.jms.queue.MessageQueue |
---|
send |
Methods inherited from interface java.util.concurrent.BlockingQueue |
---|
add, contains, remove |
Methods inherited from interface java.util.Queue |
---|
element, remove |
Methods inherited from interface java.util.Collection |
---|
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
protected AbstractQueue()
Method Detail |
---|
public void setQueueName(java.lang.String name)
protected void init()
@PostConstruct public void postConstruct()
public QueueEntry<E> receiveEntry(long expireTime, boolean isAutoAck)
receiveEntry
in interface MessageQueue<E>
public QueueEntry<E> receiveEntry(long expireTime, boolean isAutoAck, QueueEntrySelector selector) throws MessageException
MessageException
public void receive(long expireTime, boolean isAutoAck, QueueEntrySelector selector, MessageCallback callback) throws MessageException
MessageException
public void addMessageCallback(MessageCallback<E> callback, boolean isAutoAck)
addMessageCallback
in interface MessageQueue<E>
public void removeMessageCallback(MessageCallback<E> entryCallback)
removeMessageCallback
in interface MessageQueue<E>
public void acknowledge(java.lang.String msgId)
acknowledge
in interface MessageQueue<E>
acknowledge
in class AbstractDestination<E>
msgId
- message to acknowledgepublic void rollback(java.lang.String msgId)
rollback
in interface MessageQueue<E>
rollback
in class AbstractDestination<E>
public E receive(long expireTime, boolean isAutoAcknowledge) throws MessageException
receive
in interface MessageQueue<E>
MessageException
public E receive(long expireTime, boolean isAutoAcknowledge, QueueEntrySelector selector) throws MessageException
MessageException
public java.util.ArrayList<? extends QueueEntry<E>> getBrowserList()
public int size()
size
in interface java.util.Collection<E>
size
in class java.util.AbstractCollection<E>
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in class java.util.AbstractCollection<E>
public boolean offer(E message, long timeout, java.util.concurrent.TimeUnit unit)
offer
in interface java.util.concurrent.BlockingQueue<E>
public boolean offer(E message)
offer
in interface java.util.concurrent.BlockingQueue<E>
offer
in interface java.util.Queue<E>
public void put(E value)
put
in interface java.util.concurrent.BlockingQueue<E>
public E poll(long timeout, java.util.concurrent.TimeUnit unit)
poll
in interface java.util.concurrent.BlockingQueue<E>
public int remainingCapacity()
remainingCapacity
in interface java.util.concurrent.BlockingQueue<E>
public E peek()
peek
in interface java.util.Queue<E>
public E poll()
poll
in interface java.util.Queue<E>
public E take()
take
in interface java.util.concurrent.BlockingQueue<E>
public int drainTo(java.util.Collection<? super E> c)
drainTo
in interface java.util.concurrent.BlockingQueue<E>
public int drainTo(java.util.Collection<? super E> c, int max)
drainTo
in interface java.util.concurrent.BlockingQueue<E>
public int getConsumerCount()
public int getReceiverCount()
public int getQueueSize()
public long getListenerFailCountTotal()
public long getListenerFailLastTime()
public void addListenerException(java.lang.Exception e)
@PreDestroy public void close()
close
in class AbstractDestination<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |