public class OutboundConsumer extends Object implements MessageConsumer
OutboundConsumer
instance wraps a JMS consumer
for a component involved in outbound messaging.Modifier and Type | Field and Description |
---|---|
protected MessageConsumer |
consumer
Wrapped JMS consumer.
|
static org.objectweb.util.monolog.api.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(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.
|
MessageListener |
getMessageListener()
Forbidden call on a component's outbound consumer, throws a
IllegalStateException instance. |
String |
getMessageSelector()
Delegates the call to the wrapped JMS consumer.
|
Message |
receive()
Delegates the call to the wrapped JMS consumer.
|
Message |
receive(long timeOut)
Delegates the call to the wrapped JMS consumer.
|
Message |
receiveNoWait()
Delegates the call to the wrapped JMS consumer.
|
void |
setMessageListener(MessageListener messageListener)
Forbidden call on a component's outbound consumer, throws a
IllegalStateException instance. |
public static org.objectweb.util.monolog.api.Logger logger
protected OutboundSession session
OutboundSession
this consumer belongs to.protected MessageConsumer consumer
boolean valid
false
if consumer is no more valid.OutboundConsumer(MessageConsumer consumer, OutboundSession session)
OutboundConsumer
instance.consumer
- JMS consumer to wrap.session
- The OutboundSession this consumer belongs to.public void setMessageListener(MessageListener messageListener) throws JMSException
IllegalStateException
instance.setMessageListener
in interface MessageConsumer
JMSException
public MessageListener getMessageListener() throws JMSException
IllegalStateException
instance.getMessageListener
in interface MessageConsumer
JMSException
public String getMessageSelector() throws JMSException
getMessageSelector
in interface MessageConsumer
JMSException
public Message receive(long timeOut) throws JMSException
receive
in interface MessageConsumer
JMSException
public Message receive() throws JMSException
receive
in interface MessageConsumer
JMSException
public Message receiveNoWait() throws JMSException
receiveNoWait
in interface MessageConsumer
JMSException
public void close() throws JMSException
close
in interface MessageConsumer
JMSException
protected void checkValidity() throws IllegalStateException
IllegalStateException
Copyright © 2015 ScalAgent D.T.. All Rights Reserved.