class InboundSession extends Object implements ServerSession, Work, MessageListener
InboundSession
instance is responsible for processing
delivered messages within a javax.resource.spi.Work
instance,
and passing them to a set of application server endpoints.Modifier and Type | Field and Description |
---|---|
private InboundConsumer |
consumer
InboundConsumer instance this session belongs to. |
private MessageEndpointFactory |
endpointFactory
Application's endpoints factory.
|
static Logger |
logger |
private Session |
session
javax.jms.Session instance dedicated to processing
the delivered messages. |
private WorkManager |
workManager
Application server's
WorkManager instance. |
private XAResource |
xaResource
XAResource instance, if any. |
Constructor and Description |
---|
InboundSession(InboundConsumer consumer,
WorkManager workManager,
MessageEndpointFactory endpointFactory,
XAConnection cnx,
boolean transacted,
int ackMode)
Constructs an
InboundSession instance. |
Modifier and Type | Method and Description |
---|---|
Session |
getSession()
Provides the wrapped
javax.jms.Session instance for
processing delivered messages. |
void |
onMessage(Message message)
Forwards a processed message to an endpoint.
|
void |
release()
javax.resource.spi.Work method, not effective. |
void |
run()
Runs the wrapped session for processing the messages.
|
void |
start()
Notifies that the messages are ready to be processed.
|
public static Logger logger
private InboundConsumer consumer
InboundConsumer
instance this session belongs to.private WorkManager workManager
WorkManager
instance.private MessageEndpointFactory endpointFactory
private Session session
javax.jms.Session
instance dedicated to processing
the delivered messages.private XAResource xaResource
XAResource
instance, if any.InboundSession(InboundConsumer consumer, WorkManager workManager, MessageEndpointFactory endpointFactory, XAConnection cnx, boolean transacted, int ackMode)
InboundSession
instance.consumer
- InboundConsumer creating this session.workManager
- Application server's WorkManager
instance.endpointFactory
- Application's endpoints factory.cnx
- Connection to the underlying JORAM server.transacted
- true
if deliveries occur within a
XA transaction.public Session getSession() throws JMSException
javax.jms.Session
instance for
processing delivered messages.getSession
in interface ServerSession
JMSException
- Never thrown.public void start() throws JMSException
start
in interface ServerSession
JMSException
- If submitting the processing work fails.public void release()
javax.resource.spi.Work
method, not effective.public void run()
public void onMessage(Message message)
onMessage
in interface MessageListener
Copyright © 2023 ScalAgent D.T.. All rights reserved.