com.caucho.jms.file
Class FileTopicImpl<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by com.caucho.jms.queue.AbstractDestination<E>
              extended by com.caucho.jms.queue.AbstractTopic<E>
                  extended by com.caucho.jms.file.FileTopicImpl<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:
FileTopic, FileTopic

public class FileTopicImpl<E>
extends AbstractTopic<E>

Implements a file topic.

See Also:
Serialized Form

Constructor Summary
  FileTopicImpl()
           
protected FileTopicImpl(Path path, java.lang.String name, java.lang.String serverId)
           
 
Method Summary
 void closeSubscriber(AbstractQueue<E> queue)
           
 AbstractQueue<E> createSubscriber(java.lang.String publisher, java.lang.String name, boolean noLocal)
           
 java.lang.String getUrl()
          Returns the JMS configuration url.
 void init()
           
 void send(java.lang.String msgId, E payload, int priority, long timeout, java.lang.String publisher)
          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
drainTo, drainTo, iterator, offer, offer, peek, poll, poll, postConstruct, put, receive, remainingCapacity, setTopicName, size, take
 
Methods inherited from class com.caucho.jms.queue.AbstractDestination
acknowledge, close, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getTopicName, hasMessage, rollback, setName, setSerializationHandle
 
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

FileTopicImpl

public FileTopicImpl()

FileTopicImpl

protected FileTopicImpl(Path path,
                        java.lang.String name,
                        java.lang.String serverId)
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<E>

init

public void init()
Overrides:
init in class AbstractTopic<E>

createSubscriber

public AbstractQueue<E> createSubscriber(java.lang.String publisher,
                                         java.lang.String name,
                                         boolean noLocal)
Specified by:
createSubscriber in class AbstractTopic<E>

closeSubscriber

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

send

public void send(java.lang.String msgId,
                 E payload,
                 int priority,
                 long timeout,
                 java.lang.String publisher)
          throws MessageException
Description copied from class: AbstractDestination
Sends a message to the queue

Overrides:
send in class AbstractDestination<E>
Throws:
MessageException

toString

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