com.caucho.jms.queue
Class AbstractTopic<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
com.caucho.jms.queue.AbstractDestination<E>
com.caucho.jms.queue.AbstractTopic<E>
- All Implemented Interfaces:
- HandleAware, java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.concurrent.BlockingQueue<E>, java.util.Queue<E>, Destination, Topic
- Direct Known Subclasses:
- FileTopicImpl, MemoryTopicImpl, PollingTopic
public abstract class AbstractTopic<E>
- extends AbstractDestination<E>
- implements Topic
Implements an abstract topic.
- See Also:
- Serialized Form
Methods inherited from class com.caucho.jms.queue.AbstractDestination |
acknowledge, close, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getTopicName, getUrl, hasMessage, rollback, 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 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 |
AbstractTopic
public AbstractTopic()
setTopicName
public void setTopicName(java.lang.String name)
init
protected void init()
postConstruct
@PostConstruct
public void postConstruct()
receive
public E receive(long expireTime,
boolean isAutoCommit)
- Polls the next message from the store. If no message is available,
wait for the timeout.
createSubscriber
public abstract AbstractQueue<E> createSubscriber(java.lang.String publisher,
java.lang.String name,
boolean noLocal)
closeSubscriber
public abstract void closeSubscriber(AbstractQueue<E> subscriber)
size
public int size()
- Specified by:
size
in interface java.util.Collection<E>
- Specified by:
size
in class java.util.AbstractCollection<E>
iterator
public java.util.Iterator<E> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<E>
- Specified by:
iterator
in interface java.util.Collection<E>
- Specified by:
iterator
in class java.util.AbstractCollection<E>
offer
public boolean offer(E value,
long timeout,
java.util.concurrent.TimeUnit unit)
- Adds the item to the queue, waiting if necessary
- Specified by:
offer
in interface java.util.concurrent.BlockingQueue<E>
offer
public boolean offer(E value)
- Specified by:
offer
in interface java.util.concurrent.BlockingQueue<E>
- Specified by:
offer
in interface java.util.Queue<E>
put
public void put(E value)
- Specified by:
put
in interface java.util.concurrent.BlockingQueue<E>
poll
public E poll(long timeout,
java.util.concurrent.TimeUnit unit)
- Specified by:
poll
in interface java.util.concurrent.BlockingQueue<E>
remainingCapacity
public int remainingCapacity()
- Specified by:
remainingCapacity
in interface java.util.concurrent.BlockingQueue<E>
peek
public E peek()
- Specified by:
peek
in interface java.util.Queue<E>
poll
public E poll()
- Specified by:
poll
in interface java.util.Queue<E>
take
public E take()
- Specified by:
take
in interface java.util.concurrent.BlockingQueue<E>
drainTo
public int drainTo(java.util.Collection c)
- Specified by:
drainTo
in interface java.util.concurrent.BlockingQueue<E>
drainTo
public int drainTo(java.util.Collection c,
int max)
- Specified by:
drainTo
in interface java.util.concurrent.BlockingQueue<E>