public class ServerSessionImpl extends Object implements ServerSession, InboundContext, Work, ActiveMQSession.DeliveryListener
| Modifier and Type | Field and Description |
|---|---|
static Method |
ON_MESSAGE_METHOD |
| Constructor and Description |
|---|
ServerSessionImpl(ServerSessionPoolImpl pool,
ActiveMQSession session,
WorkManager workManager,
MessageEndpoint endpoint,
boolean useRAManagedTx,
int batchSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterDelivery(ActiveMQSession session,
Message msg)
The ActiveMQSession's run method will call back to this method after
dispactching a message to the MessageListener.
|
void |
beforeDelivery(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, ActiveMQSession session, WorkManager workManager, MessageEndpoint endpoint, boolean useRAManagedTx, int batchSize) throws JMSException
JMSExceptionpublic Session getSession() throws JMSException
InboundContextgetSession in interface ServerSessiongetSession in interface InboundContextJMSExceptionprotected boolean isStale()
public MessageProducer getMessageProducer() throws JMSException
InboundContextgetMessageProducer in interface InboundContextJMSExceptionpublic void start() throws JMSException
start in interface ServerSessionJMSExceptionServerSession.start()public void run()
run in interface RunnableRunnable.run()public void beforeDelivery(ActiveMQSession session, Message msg)
beforeDelivery in interface ActiveMQSession.DeliveryListenerpublic void afterDelivery(ActiveMQSession session, Message msg)
afterDelivery in interface ActiveMQSession.DeliveryListenerpublic void release()
release in interface WorkWork.release()public String toString()
toString in class ObjectObject.toString()public void close()
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.