com.caucho.jms.queue
Class PollingTopic<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.queue.PollingTopic<E>
All Implemented Interfaces:
HandleAware, AlarmListener, java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.concurrent.BlockingQueue<E>, java.util.EventListener, java.util.Queue<E>, Destination, Topic

public abstract class PollingTopic<E>
extends AbstractTopic<E>
implements AlarmListener

Implements an topic which polls the data periodically.

See Also:
Serialized Form

Constructor Summary
protected PollingTopic()
           
 
Method Summary
 void handleAlarm(Alarm alarm)
          Handles a callback from an alarm.
protected  boolean isPolling()
           
protected  void run()
           
 void setPollPeriod(Period period)
           
 void startPoll()
           
 void stopPoll()
           
 
Methods inherited from class com.caucho.jms.queue.AbstractTopic
closeSubscriber, createSubscriber, drainTo, drainTo, init, 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, 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 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
 

Constructor Detail

PollingTopic

protected PollingTopic()
Method Detail

setPollPeriod

public void setPollPeriod(Period period)

isPolling

protected boolean isPolling()

startPoll

public void startPoll()

stopPoll

public void stopPoll()

handleAlarm

public void handleAlarm(Alarm alarm)
Description copied from interface: AlarmListener
Handles a callback from an alarm.

Specified by:
handleAlarm in interface AlarmListener

run

protected void run()