public class ServerSessionImpl extends Object implements ServerSession, InboundContext, Work, org.apache.activemq.ActiveMQSession.DeliveryListener
Modifier and Type | Field and Description |
---|---|
static Method |
ON_MESSAGE_METHOD |
Constructor and Description |
---|
ServerSessionImpl(ServerSessionPoolImpl pool,
org.apache.activemq.ActiveMQSession session,
WorkManager workManager,
MessageEndpoint endpoint,
boolean useRAManagedTx,
int batchSize) |
Modifier and Type | Method and Description |
---|---|
void |
afterDelivery(org.apache.activemq.ActiveMQSession session,
Message msg)
The ActiveMQSession's run method will call back to this method after
dispactching a message to the MessageListener.
|
void |
beforeDelivery(org.apache.activemq.ActiveMQSession session,
Message msg)
The ActiveMQSession's run method will call back to this method before
dispactching a message to the MessageListener.
|
void |
close() |
MessageProducer |
getMessageProducer()
Lazily creates a message producer that can be used to send messages using the
same JMS Session which is being used to dispatch messages which minimises the XA
overheard of consuming and producing or allows JMS transactions to be used for consuming
and producing messages.
|
Session |
getSession()
Returns the current session being used to process a JMS message in the current thread.
|
protected boolean |
isStale() |
void |
release() |
void |
run() |
void |
start() |
String |
toString() |
public static final Method ON_MESSAGE_METHOD
public ServerSessionImpl(ServerSessionPoolImpl pool, org.apache.activemq.ActiveMQSession session, WorkManager workManager, MessageEndpoint endpoint, boolean useRAManagedTx, int batchSize) throws JMSException
JMSException
public Session getSession() throws JMSException
InboundContext
getSession
in interface ServerSession
getSession
in interface InboundContext
JMSException
protected boolean isStale()
public MessageProducer getMessageProducer() throws JMSException
InboundContext
getMessageProducer
in interface InboundContext
JMSException
public void start() throws JMSException
start
in interface ServerSession
JMSException
ServerSession.start()
public void run()
run
in interface Runnable
Runnable.run()
public void beforeDelivery(org.apache.activemq.ActiveMQSession session, Message msg)
beforeDelivery
in interface org.apache.activemq.ActiveMQSession.DeliveryListener
public void afterDelivery(org.apache.activemq.ActiveMQSession session, Message msg)
afterDelivery
in interface org.apache.activemq.ActiveMQSession.DeliveryListener
public void release()
release
in interface Work
Work.release()
public String toString()
toString
in class Object
Object.toString()
public void close()
Copyright © 2005–2017 FuseSource, Corp.. All rights reserved.