org.codehaus.activemq.ra
Class InboundEndpointWork

java.lang.Object
  extended byorg.codehaus.activemq.ra.InboundEndpointWork
All Implemented Interfaces:
Runnable, SessionAndProducer, Work

public class InboundEndpointWork
extends Object
implements SessionAndProducer, Work

Version:
$Revision: 1.1 $

Constructor Summary
InboundEndpointWork(org.codehaus.activemq.ActiveMQSession session, MessageEndpoint endpoint, CircularQueue workers)
           
 
Method Summary
 org.codehaus.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.codehaus.activemq.message.ActiveMQMessage message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InboundEndpointWork

public InboundEndpointWork(org.codehaus.activemq.ActiveMQSession session,
                           MessageEndpoint endpoint,
                           CircularQueue workers)
                    throws JMSException
Parameters:
session -
endpoint -
workers -
Throws:
JMSException
Method Detail

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.codehaus.activemq.message.ActiveMQMessage getMessage()

setMessage

public void setMessage(org.codehaus.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-2005 Protique, Ltd.. All Rights Reserved.