Package org.apache.activemq.jms.pool
Class PooledMessageConsumer
- java.lang.Object
-
- org.apache.activemq.jms.pool.PooledMessageConsumer
-
- All Implemented Interfaces:
MessageConsumer
public class PooledMessageConsumer extends Object implements MessageConsumer
AMessageConsumer
which was created byPooledSession
.
-
-
Constructor Summary
Constructors Constructor Description PooledMessageConsumer(PooledSession session, MessageConsumer delegate)
Wraps the message consumer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
MessageListener
getMessageListener()
String
getMessageSelector()
Message
receive()
Message
receive(long timeout)
Message
receiveNoWait()
void
setMessageListener(MessageListener listener)
String
toString()
-
-
-
Constructor Detail
-
PooledMessageConsumer
public PooledMessageConsumer(PooledSession session, MessageConsumer delegate)
Wraps the message consumer.- Parameters:
session
- the pooled sessiondelegate
- the created consumer to wrap
-
-
Method Detail
-
close
public void close() throws JMSException
- Specified by:
close
in interfaceMessageConsumer
- Throws:
JMSException
-
getMessageListener
public MessageListener getMessageListener() throws JMSException
- Specified by:
getMessageListener
in interfaceMessageConsumer
- Throws:
JMSException
-
getMessageSelector
public String getMessageSelector() throws JMSException
- Specified by:
getMessageSelector
in interfaceMessageConsumer
- Throws:
JMSException
-
receive
public Message receive() throws JMSException
- Specified by:
receive
in interfaceMessageConsumer
- Throws:
JMSException
-
receive
public Message receive(long timeout) throws JMSException
- Specified by:
receive
in interfaceMessageConsumer
- Throws:
JMSException
-
receiveNoWait
public Message receiveNoWait() throws JMSException
- Specified by:
receiveNoWait
in interfaceMessageConsumer
- Throws:
JMSException
-
setMessageListener
public void setMessageListener(MessageListener listener) throws JMSException
- Specified by:
setMessageListener
in interfaceMessageConsumer
- Throws:
JMSException
-
-