Class InboundSession
- java.lang.Object
-
- org.objectweb.joram.client.connector.InboundSession
-
- All Implemented Interfaces:
Runnable,MessageListener,ServerSession,Work
class InboundSession extends Object implements ServerSession, Work, MessageListener
AnInboundSessioninstance is responsible for processing delivered messages within ajavax.resource.spi.Workinstance, and passing them to a set of application server endpoints.
-
-
Field Summary
Fields Modifier and Type Field Description private InboundConsumerconsumerInboundConsumerinstance this session belongs to.private static booleanDEBUGprivate MessageEndpointFactoryendpointFactoryApplication's endpoints factory.private static Loggerloggerprivate SessionsessionSessioninstance dedicated to processing the delivered messages.private WorkManagerworkManagerApplication server'sWorkManagerinstance.private XAResourcexaResourceXAResourceinstance, if any.
-
Constructor Summary
Constructors Constructor Description InboundSession(InboundConsumer consumer, WorkManager workManager, MessageEndpointFactory endpointFactory, XAConnection cnx, boolean transacted, int ackMode)Constructs anInboundSessioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessiongetSession()Provides the wrappedSessioninstance for processing delivered messages.voidonMessage(Message message)Forwards a processed message to an endpoint.voidrelease()javax.resource.spi.Workmethod, not effective.voidrun()Runs the wrapped session for processing the messages.voidstart()Notifies that the messages are ready to be processed.
-
-
-
Field Detail
-
logger
private static final Logger logger
-
DEBUG
private static final boolean DEBUG
-
consumer
private InboundConsumer consumer
InboundConsumerinstance this session belongs to.
-
workManager
private WorkManager workManager
Application server'sWorkManagerinstance.
-
endpointFactory
private MessageEndpointFactory endpointFactory
Application's endpoints factory.
-
session
private Session session
Sessioninstance dedicated to processing the delivered messages.
-
xaResource
private XAResource xaResource
XAResourceinstance, if any.
-
-
Constructor Detail
-
InboundSession
InboundSession(InboundConsumer consumer, WorkManager workManager, MessageEndpointFactory endpointFactory, XAConnection cnx, boolean transacted, int ackMode)
Constructs anInboundSessioninstance.- Parameters:
consumer- InboundConsumer creating this session.workManager- Application server'sWorkManagerinstance.endpointFactory- Application's endpoints factory.cnx- Connection to the underlying JORAM server.transacted-trueif deliveries occur within a XA transaction.
-
-
Method Detail
-
getSession
public Session getSession() throws JMSException
Provides the wrappedSessioninstance for processing delivered messages.- Specified by:
getSessionin interfaceServerSession- Throws:
JMSException- Never thrown.
-
start
public void start() throws JMSExceptionNotifies that the messages are ready to be processed.- Specified by:
startin interfaceServerSession- Throws:
JMSException- If submitting the processing work fails.
-
release
public void release()
javax.resource.spi.Workmethod, not effective.
-
run
public void run()
Runs the wrapped session for processing the messages.
-
onMessage
public void onMessage(Message message)
Forwards a processed message to an endpoint.- Specified by:
onMessagein interfaceMessageListener
-
-