com.caucho.jms.connection
Class TemporaryTopicImpl

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue
          extended by com.caucho.jms.queue.AbstractDestination
              extended by com.caucho.jms.queue.AbstractTopic
                  extended by com.caucho.jms.memory.MemoryTopic
                      extended by com.caucho.jms.connection.TemporaryTopicImpl
All Implemented Interfaces:
HandleAware, java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.concurrent.BlockingQueue, java.util.Queue, Destination, TemporaryTopic, Topic

public class TemporaryTopicImpl
extends MemoryTopic
implements TemporaryTopic

A basic topic.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.jms.queue.AbstractDestination
_messageFactory
 
Method Summary
 void addMessageAvailableListener(MessageAvailableListener consumer)
          Adds a new listener to receive message available events.
 void delete()
           
 void removeMessageAvailableListener(MessageAvailableListener consumer)
          Removes the consumer receiving messages.
 
Methods inherited from class com.caucho.jms.memory.MemoryTopic
closeSubscriber, createSubscriber, getUrl, send
 
Methods inherited from class com.caucho.jms.queue.AbstractTopic
init, postConstruct, receive, setTopicName
 
Methods inherited from class com.caucho.jms.queue.AbstractDestination
acknowledge, close, drainTo, drainTo, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getReadConsumer, getTopicName, getWriteSession, hasMessage, iterator, offer, offer, peek, poll, poll, put, receive, remainingCapacity, rollback, setName, setSerializationHandle, size, take, 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, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Topic
getTopicName, toString
 
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
 

Method Detail

addMessageAvailableListener

public void addMessageAvailableListener(MessageAvailableListener consumer)
Description copied from class: AbstractDestination
Adds a new listener to receive message available events. The listener will wake or spawn a thread to handle the new message. It MUST NOT handle the message on the event thread. Each listener should be associated with a single thread, i.e. multiple notifyMessageAvailable() calls MUST NOT spawn multiple threads. This single-thread restriction is necessary to properly manage round-robin behavior.

Overrides:
addMessageAvailableListener in class AbstractDestination

removeMessageAvailableListener

public void removeMessageAvailableListener(MessageAvailableListener consumer)
Description copied from class: AbstractDestination
Removes the consumer receiving messages.

Overrides:
removeMessageAvailableListener in class AbstractDestination

delete

public void delete()
            throws JMSException
Specified by:
delete in interface TemporaryTopic
Throws:
JMSException