Save This Page
Home » JBoss-5.1.0 » org » jboss » mq » [javadoc | source]
org.jboss.mq
public class: SpyMessageConsumer [javadoc | source]
java.lang.Object
   org.jboss.mq.SpyMessageConsumer

All Implemented Interfaces:
    javax.jms.MessageConsumer, SpyConsumer, Runnable

Direct Known Subclasses:
    SpyQueueReceiver, SpyTopicSubscriber

This class implements javax.jms.MessageConsumer.
Field Summary
static  Logger log    The log 
static  boolean trace    Is trace enabled 
static final  Integer ONCE    Delivered once 
public  SpySession session    Link to my session 
public  Subscription subscription    The subscription structure should be fill out by the descendent 
protected  Object stateLock    The state lock 
protected  boolean receiving    Are we receiving a message 
protected  boolean waitingForMessage    Are we waiting for a message 
protected  boolean listening    Are we listening 
protected  Thread listenerThread    The listener thread 
 MessageListener messageListener    My message listener (null if none) 
 LinkedList messages    List of Pending messages (not yet delivered) 
 boolean sessionConsumer    Is this a session consumer? 
Constructor:
 SpyMessageConsumer(SpySession s,
    boolean sessionConsumer) 
    Create a new SpyMessageConsumer
    Parameters:
    s - the session
    sessionConsumer - true for a session consumer, false otherwise
 SpyMessageConsumer(SpySession s,
    boolean sessionConsumer,
    SpyDestination destination,
    String selector,
    boolean noLocal) throws InvalidSelectorException 
    Create a new SpyMessageConsumer
    Parameters:
    s - the session
    sessionConsumer - true for a session consumer, false otherwise
    destination - the destination
    selector - the selector
    noLocal - true for noLocal, false otherwise
Method from org.jboss.mq.SpyMessageConsumer Summary:
addMessage,   close,   getDestination,   getMessage,   getMessageListener,   getMessageSelector,   getNoLocal,   getSubscription,   isListening,   preProcessMessage,   prepareDelivery,   receive,   receive,   receiveNoWait,   restartProcessing,   run,   sessionConsumerProcessMessage,   setMessageListener,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mq.SpyMessageConsumer Detail:
 public  void addMessage(SpyMessage message) throws JMSException 
    Add a message
 public  void close() throws JMSException 
 protected Destination getDestination() throws JMSException 
 Message getMessage() 
 public MessageListener getMessageListener() throws JMSException 
 public String getMessageSelector() throws JMSException 
 protected boolean getNoLocal() throws JMSException 
 public Subscription getSubscription() 
    Get the subscription
 protected boolean isListening() 
    Are we listening
 Message preProcessMessage(SpyMessage message) throws JMSException 
  void prepareDelivery(SpyMessage message) throws JMSException 
    Prepare the message for delivery
 public Message receive() throws JMSException 
 public Message receive(long timeOut) throws JMSException 
 public Message receiveNoWait() throws JMSException 
 public  void restartProcessing() 
    Restarts the processing of the messages in case of a recovery
 public  void run() 
 protected  void sessionConsumerProcessMessage(SpyMessage message) throws JMSException 
 public  void setMessageListener(MessageListener listener) throws JMSException 
 public String toString()