org.apache.activemq.pool
Class PooledMessageConsumer

java.lang.Object
  extended by org.apache.activemq.pool.PooledMessageConsumer
All Implemented Interfaces:
MessageConsumer

public class PooledMessageConsumer
extends Object
implements MessageConsumer

A MessageConsumer which was created by PooledSession.


Constructor Summary
PooledMessageConsumer(PooledSession session, MessageConsumer delegate)
          Wraps the message consumer.
 
Method Summary
 void close()
           
 MessageListener getMessageListener()
           
 String getMessageSelector()
           
 Message receive()
           
 Message receive(long timeout)
           
 Message receiveNoWait()
           
 void setMessageListener(MessageListener listener)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PooledMessageConsumer

public PooledMessageConsumer(PooledSession session,
                             MessageConsumer delegate)
Wraps the message consumer.

Parameters:
session - the pooled session
delegate - the created consumer to wrap
Method Detail

close

public void close()
           throws JMSException
Specified by:
close in interface MessageConsumer
Throws:
JMSException

getMessageListener

public MessageListener getMessageListener()
                                   throws JMSException
Specified by:
getMessageListener in interface MessageConsumer
Throws:
JMSException

getMessageSelector

public String getMessageSelector()
                          throws JMSException
Specified by:
getMessageSelector in interface MessageConsumer
Throws:
JMSException

receive

public Message receive()
                throws JMSException
Specified by:
receive in interface MessageConsumer
Throws:
JMSException

receive

public Message receive(long timeout)
                throws JMSException
Specified by:
receive in interface MessageConsumer
Throws:
JMSException

receiveNoWait

public Message receiveNoWait()
                      throws JMSException
Specified by:
receiveNoWait in interface MessageConsumer
Throws:
JMSException

setMessageListener

public void setMessageListener(MessageListener listener)
                        throws JMSException
Specified by:
setMessageListener in interface MessageConsumer
Throws:
JMSException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.