public class OutboundConsumer extends Object implements jakarta.jms.MessageConsumer
OutboundConsumer
instance wraps a JMS consumer
for a component involved in outbound messaging.Modifier and Type | Field and Description |
---|---|
protected jakarta.jms.MessageConsumer |
consumer
Wrapped JMS consumer.
|
static Logger |
logger |
protected OutboundSession |
session
The
OutboundSession this consumer belongs to. |
(package private) boolean |
valid
false if consumer is no more valid. |
Constructor and Description |
---|
OutboundConsumer(jakarta.jms.MessageConsumer consumer,
OutboundSession session)
Constructs an
OutboundConsumer instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
checkValidity()
Checks the validity of the subscriber instance.
|
void |
close()
Delegates the call to the wrapped JMS consumer.
|
jakarta.jms.MessageListener |
getMessageListener()
Forbidden call on a component's outbound consumer, throws a
IllegalStateException instance. |
String |
getMessageSelector()
Delegates the call to the wrapped JMS consumer.
|
jakarta.jms.Message |
receive()
Delegates the call to the wrapped JMS consumer.
|
jakarta.jms.Message |
receive(long timeOut)
Delegates the call to the wrapped JMS consumer.
|
jakarta.jms.Message |
receiveNoWait()
Delegates the call to the wrapped JMS consumer.
|
void |
setMessageListener(jakarta.jms.MessageListener messageListener)
Forbidden call on a component's outbound consumer, throws a
IllegalStateException instance. |
public static Logger logger
protected OutboundSession session
OutboundSession
this consumer belongs to.protected jakarta.jms.MessageConsumer consumer
boolean valid
false
if consumer is no more valid.OutboundConsumer(jakarta.jms.MessageConsumer consumer, OutboundSession session)
OutboundConsumer
instance.consumer
- JMS consumer to wrap.session
- The OutboundSession this consumer belongs to.protected void checkValidity() throws jakarta.jms.IllegalStateException
jakarta.jms.IllegalStateException
public void setMessageListener(jakarta.jms.MessageListener messageListener) throws jakarta.jms.JMSException
IllegalStateException
instance.setMessageListener
in interface jakarta.jms.MessageConsumer
jakarta.jms.JMSException
public jakarta.jms.MessageListener getMessageListener() throws jakarta.jms.JMSException
IllegalStateException
instance.getMessageListener
in interface jakarta.jms.MessageConsumer
jakarta.jms.JMSException
public String getMessageSelector() throws jakarta.jms.JMSException
getMessageSelector
in interface jakarta.jms.MessageConsumer
jakarta.jms.JMSException
public jakarta.jms.Message receive(long timeOut) throws jakarta.jms.JMSException
receive
in interface jakarta.jms.MessageConsumer
jakarta.jms.JMSException
public jakarta.jms.Message receive() throws jakarta.jms.JMSException
receive
in interface jakarta.jms.MessageConsumer
jakarta.jms.JMSException
public jakarta.jms.Message receiveNoWait() throws jakarta.jms.JMSException
receiveNoWait
in interface jakarta.jms.MessageConsumer
jakarta.jms.JMSException
public void close() throws jakarta.jms.JMSException
close
in interface jakarta.jms.MessageConsumer
close
in interface AutoCloseable
jakarta.jms.JMSException
Copyright © 2023 ScalAgent D.T.. All rights reserved.