com.caucho.jms.queue
Class PollingQueue

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.AbstractQueue
                  extended by com.caucho.jms.queue.PollingQueue
All Implemented Interfaces:
AlarmListener, HandleAware, java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.concurrent.BlockingQueue, java.util.EventListener, java.util.Queue, Destination
Direct Known Subclasses:
ClientQueue, JdbcQueue

public abstract class PollingQueue
extends AbstractQueue
implements AlarmListener

Implements an queue which polls the data periodically.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.jms.queue.AbstractDestination
_messageFactory
 
Constructor Summary
protected PollingQueue()
           
 
Method Summary
 void handleAlarm(Alarm alarm)
          Handles a callback from an alarm.
protected  void pollImpl()
           
 void setPollPeriod(Period period)
           
protected  void startPoll()
           
protected  void stopPoll()
           
 
Methods inherited from class com.caucho.jms.queue.AbstractQueue
addListenerException, addMessageAvailableListener, close, getBrowserList, getConsumerCount, getListenerFailCountTotal, getListenerFailLastTime, getQueueSize, init, notifyMessageAvailable, postConstruct, removeMessageAvailableListener, setQueueName
 
Methods inherited from class com.caucho.jms.queue.AbstractDestination
acknowledge, drainTo, drainTo, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getReadConsumer, getTopicName, getUrl, getWriteSession, hasMessage, iterator, offer, offer, peek, poll, poll, put, receive, remainingCapacity, rollback, send, 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, wait, wait, wait
 
Methods inherited from interface javax.jms.Queue
getQueueName, 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

PollingQueue

protected PollingQueue()
Method Detail

setPollPeriod

public void setPollPeriod(Period period)

startPoll

protected void startPoll()
Overrides:
startPoll in class AbstractQueue

stopPoll

protected void stopPoll()
Overrides:
stopPoll in class AbstractQueue

handleAlarm

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

Specified by:
handleAlarm in interface AlarmListener

pollImpl

protected void pollImpl()