public abstract class AbstractTopic<E> extends AbstractDestination<E> implements Topic
Constructor and Description |
---|
AbstractTopic() |
Modifier and Type | Method and Description |
---|---|
abstract void |
closeSubscriber(AbstractQueue<E> subscriber) |
abstract AbstractQueue<E> |
createSubscriber(java.lang.String publisher,
java.lang.String name,
boolean noLocal) |
int |
drainTo(java.util.Collection c) |
int |
drainTo(java.util.Collection c,
int max) |
protected void |
init() |
java.util.Iterator<E> |
iterator() |
boolean |
offer(E value) |
boolean |
offer(E value,
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 isAutoCommit)
Polls the next message from the store.
|
int |
remainingCapacity() |
void |
setTopicName(java.lang.String name) |
int |
size() |
E |
take() |
acknowledge, close, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getTopicName, getUrl, hasMessage, rollback, send, setName, setSerializationHandle, toString
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTopicName, toString
public void setTopicName(java.lang.String name)
protected void init()
@PostConstruct public void postConstruct()
public E receive(long expireTime, boolean isAutoCommit)
public abstract AbstractQueue<E> createSubscriber(java.lang.String publisher, java.lang.String name, boolean noLocal)
public abstract void closeSubscriber(AbstractQueue<E> subscriber)
public int size()
public java.util.Iterator<E> iterator()
public boolean offer(E value, long timeout, java.util.concurrent.TimeUnit unit)
offer
in interface java.util.concurrent.BlockingQueue<E>
public boolean offer(E value)
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 int drainTo(java.util.Collection c)
drainTo
in interface java.util.concurrent.BlockingQueue<E>
public int drainTo(java.util.Collection c, int max)
drainTo
in interface java.util.concurrent.BlockingQueue<E>