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