org.activemq.ra
Class ServerSessionImpl
java.lang.Object
org.activemq.ra.ServerSessionImpl
- All Implemented Interfaces:
- org.activemq.ActiveMQSession.DeliveryListener, Runnable, ServerSession, SessionAndProducer, Work
- public class ServerSessionImpl
- extends Object
- implements ServerSession, SessionAndProducer, Work, org.activemq.ActiveMQSession.DeliveryListener
- Version:
- $Revision: 1.1.1.1 $
Method Summary |
void |
afterDelivery(org.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.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. |
void |
release()
|
void |
run()
|
void |
start()
|
String |
toString()
|
ON_MESSAGE_METHOD
public static final Method ON_MESSAGE_METHOD
ServerSessionImpl
public ServerSessionImpl(ServerSessionPoolImpl pool,
org.activemq.ActiveMQSession session,
WorkManager workManager,
MessageEndpoint endpoint,
boolean useRAManagedTx,
int batchSize)
throws JMSException
getSession
public Session getSession()
throws JMSException
- Description copied from interface:
SessionAndProducer
- Returns the current session being used to process a JMS message in the current thread.
- Specified by:
getSession
in interface ServerSession
- Throws:
JMSException
getMessageProducer
public MessageProducer getMessageProducer()
throws JMSException
- Description copied from interface:
SessionAndProducer
- 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.
- Specified by:
getMessageProducer
in interface SessionAndProducer
- Returns:
- the current message producer or a new one is lazily created, using a null
destination so the destination must be specified on a send() method.
- Throws:
JMSException
start
public void start()
throws JMSException
- Specified by:
start
in interface ServerSession
- Throws:
JMSException
- See Also:
ServerSession.start()
run
public void run()
- Specified by:
run
in interface Runnable
- See Also:
Runnable.run()
beforeDelivery
public void beforeDelivery(org.activemq.ActiveMQSession session,
Message msg)
- The ActiveMQSession's run method will call back to this method before
dispactching a message to the MessageListener.
- Specified by:
beforeDelivery
in interface org.activemq.ActiveMQSession.DeliveryListener
afterDelivery
public void afterDelivery(org.activemq.ActiveMQSession session,
Message msg)
- The ActiveMQSession's run method will call back to this method after
dispactching a message to the MessageListener.
- Specified by:
afterDelivery
in interface org.activemq.ActiveMQSession.DeliveryListener
release
public void release()
- Specified by:
release
in interface Work
- See Also:
Work.release()
toString
public String toString()
- See Also:
Object.toString()
close
public void close()
Copyright © 2004-2007 Protique, Ltd.. All Rights Reserved.