com.caucho.jms.cluster
Class ClientSubscriber

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

public class ClientSubscriber
extends AbstractQueue

Implements a memory queue.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.jms.queue.AbstractDestination
_messageFactory
 
Method Summary
 void acknowledge(java.lang.String msgId)
          Acknowledge receipt of the message.
 boolean hasMessage()
          Returns true if the queue has at least one message available
 MessageImpl receive(boolean isAutoAcknowledge)
          Polls the next message from the store.
 void rollback(java.lang.String msgId)
          Rollback the message read.
 void send(JmsSession session, MessageImpl msg, int priority, long timeout)
          Polls the next message from the store.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.jms.queue.AbstractQueue
addListenerException, addMessageAvailableListener, close, getBrowserList, getConsumerCount, getListenerFailCountTotal, getListenerFailLastTime, getQueueSize, init, notifyMessageAvailable, postConstruct, removeMessageAvailableListener, setQueueName, startPoll, stopPoll
 
Methods inherited from class com.caucho.jms.queue.AbstractDestination
drainTo, drainTo, generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getReadConsumer, getTopicName, getUrl, getWriteSession, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, 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.Queue
getQueueName
 
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

send

public void send(JmsSession session,
                 MessageImpl msg,
                 int priority,
                 long timeout)
Polls the next message from the store. Returns null if no message is available.

Specified by:
send in class AbstractDestination
Parameters:
isAutoAcknowledge - if true, automatically acknowledge the message

receive

public MessageImpl receive(boolean isAutoAcknowledge)
                    throws JMSException
Polls the next message from the store. Returns null if no message is available.

Overrides:
receive in class AbstractDestination
Parameters:
isAutoAcknowledge - if true, automatically acknowledge the message
Throws:
JMSException

hasMessage

public boolean hasMessage()
Description copied from class: AbstractDestination
Returns true if the queue has at least one message available

Overrides:
hasMessage in class AbstractDestination

acknowledge

public void acknowledge(java.lang.String msgId)
Description copied from class: AbstractDestination
Acknowledge receipt of the message.

Overrides:
acknowledge in class AbstractDestination
Parameters:
msgId - message to acknowledge

rollback

public void rollback(java.lang.String msgId)
Description copied from class: AbstractDestination
Rollback the message read.

Overrides:
rollback in class AbstractDestination

toString

public java.lang.String toString()
Overrides:
toString in class AbstractDestination