public abstract class ACSJMSConsumer
extends java.lang.Object
receive methods and receiveNoWait
are not implemented and throw an UnsupportedOperationException.
Having both methods (receive and callback) in place causes an out of memory
if the queue of message is not flushed on disk.
To avoid memory neverending memory consumption I have preferred to remove
the implementations of the calls leaving only the callback
(given that at the present this is the only one used)| Modifier and Type | Field and Description |
|---|---|
protected Destination |
destination |
| Constructor and Description |
|---|
ACSJMSConsumer(Destination destination,
ContainerServicesBase contServices,
java.lang.String selector)
The constructor of the consumer
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
MessageListener |
getMessageListener() |
java.lang.String |
getMessageSelector() |
Message |
receive() |
void |
receive(ACSJMSMessageEntity message) |
Message |
receive(long timeout) |
Message |
receiveNoWait() |
void |
setMessageListener(MessageListener listener) |
void |
setMessageSelector(java.lang.String selectorString)
Set a new SQL92 selector string for the consumer
|
public ACSJMSConsumer(Destination destination,
ContainerServicesBase contServices,
java.lang.String selector)
throws JMSException
destination - contServices - The Container servicesselector - The message selector (can be empty or null)JMSExceptionpublic java.lang.String getMessageSelector()
throws JMSException
JMSExceptionpublic void setMessageSelector(java.lang.String selectorString)
selectorString - public MessageListener getMessageListener()
throws JMSException
JMSExceptionpublic void setMessageListener(MessageListener listener)
throws JMSException
JMSExceptionpublic Message receive()
throws JMSException
JMSExceptionpublic Message receive(long timeout)
throws JMSException
JMSExceptionpublic Message receiveNoWait()
throws JMSException
JMSExceptionpublic void close()
throws JMSException
JMSExceptionpublic void receive(ACSJMSMessageEntity message)