com.caucho.jms.file
Class FileTopic

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.file.FileTopic
All Implemented Interfaces:
HandleAware, java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.concurrent.BlockingQueue, java.util.Queue, Destination, Topic

public class FileTopic
extends AbstractTopic

Implements a file topic.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.jms.queue.AbstractDestination
_messageFactory
 
Constructor Summary
FileTopic()
           
 
Method Summary
 void closeSubscriber(AbstractQueue queue)
           
 AbstractQueue createSubscriber(JmsSession session, java.lang.String name, boolean noLocal)
           
 java.lang.String getUrl()
          Returns the JMS configuration url.
 void init()
           
 void send(JmsSession session, MessageImpl msg, int priority, long timeout)
          Sends a message to the queue
 void setPath(Path path)
          Sets the path to the backing database
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.jms.queue.AbstractTopic
postConstruct, receive, setTopicName
 
Methods inherited from class com.caucho.jms.queue.AbstractDestination
acknowledge, addMessageAvailableListener, close, drainTo, drainTo, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getReadConsumer, getTopicName, getWriteSession, hasMessage, iterator, offer, offer, peek, poll, poll, put, receive, remainingCapacity, removeMessageAvailableListener, rollback, setName, setSerializationHandle, size, take
 
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.Topic
getTopicName
 
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

FileTopic

public FileTopic()
Method Detail

setPath

public void setPath(Path path)
Sets the path to the backing database


getUrl

public java.lang.String getUrl()
Returns the JMS configuration url.

Overrides:
getUrl in class AbstractDestination

init

public void init()
Overrides:
init in class AbstractTopic

createSubscriber

public AbstractQueue createSubscriber(JmsSession session,
                                      java.lang.String name,
                                      boolean noLocal)
Specified by:
createSubscriber in class AbstractTopic

closeSubscriber

public void closeSubscriber(AbstractQueue queue)
Specified by:
closeSubscriber in class AbstractTopic

send

public void send(JmsSession session,
                 MessageImpl msg,
                 int priority,
                 long timeout)
          throws JMSException
Description copied from class: AbstractDestination
Sends a message to the queue

Specified by:
send in class AbstractDestination
Throws:
JMSException

toString

public java.lang.String toString()
Specified by:
toString in interface Topic
Overrides:
toString in class AbstractDestination