org.activemq.ra
Class InboundEndpointWork
java.lang.Object
org.activemq.ra.InboundEndpointWork
- All Implemented Interfaces:
- Runnable, Work, SessionAndProducer
public class InboundEndpointWork
- extends Object
- implements SessionAndProducer, Work
- Version:
- $Revision: 1.1.1.1 $
Method Summary |
org.activemq.message.ActiveMQMessage |
getMessage()
|
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 |
setMessage(org.activemq.message.ActiveMQMessage message)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InboundEndpointWork
public InboundEndpointWork(org.activemq.ActiveMQSession session,
MessageEndpoint endpoint,
CircularQueue workers)
throws JMSException
- Parameters:
session
- endpoint
- workers
-
- Throws:
JMSException
getSession
public Session getSession()
- 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 SessionAndProducer
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
getMessage
public org.activemq.message.ActiveMQMessage getMessage()
setMessage
public void setMessage(org.activemq.message.ActiveMQMessage message)
release
public void release()
- Specified by:
release
in interface Work
run
public void run()
- Specified by:
run
in interface Runnable
- See Also:
Runnable.run()
Copyright © 2004-2008 Protique, Ltd.. All Rights Reserved.