org.apache.axis2.transport.jms
Class JMSVendorAdapter

java.lang.Object
  extended byorg.apache.axis2.transport.jms.JMSVendorAdapter
Direct Known Subclasses:
BeanVendorAdapter, JNDIVendorAdapter

public abstract class JMSVendorAdapter
extends Object

SPI Interface that all JMSVendorAdaptors must implement. Allows for ConnectionFactory creation and Destination lookup


Field Summary
static int CONNECT_ACTION
           
static int ON_EXCEPTION_ACTION
           
static int RECEIVE_ACTION
           
static int SEND_ACTION
           
static int SUBSCRIBE_ACTION
           
 
Constructor Summary
JMSVendorAdapter()
           
 
Method Summary
abstract  void addVendorConnectionFactoryProperties(JMSURLHelper jmsurl, HashMap cfProps)
           
 HashMap getJMSConnectionFactoryProperties(JMSURLHelper jmsurl)
          Creates a connection factory property table using values supplied in the endpoint address
 HashMap getJMSConnectorProperties(JMSURLHelper jmsurl)
          Creates a JMS connector property table using values supplied in the endpoint address.
 javax.jms.Queue getQueue(javax.jms.QueueSession session, String name)
           
abstract  javax.jms.QueueConnectionFactory getQueueConnectionFactory(HashMap cfProps)
           
 javax.jms.Topic getTopic(javax.jms.TopicSession session, String name)
           
abstract  javax.jms.TopicConnectionFactory getTopicConnectionFactory(HashMap cfProps)
           
 String getVendorId()
           
abstract  boolean isMatchingConnectionFactory(javax.jms.ConnectionFactory cf, JMSURLHelper jmsurl, HashMap cfProps)
           
 boolean isRecoverable(Throwable thrown, int action)
           
 void setProperties(javax.jms.Message message, HashMap props)
           
 void setupApplicationProperties(MessageContext context, JMSURLHelper jmsurl)
           
 void setupMessageContext(MessageContext context, JMSURLHelper jmsurl)
          Set JMS properties in the message context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEND_ACTION

public static final int SEND_ACTION
See Also:
Constant Field Values

CONNECT_ACTION

public static final int CONNECT_ACTION
See Also:
Constant Field Values

SUBSCRIBE_ACTION

public static final int SUBSCRIBE_ACTION
See Also:
Constant Field Values

RECEIVE_ACTION

public static final int RECEIVE_ACTION
See Also:
Constant Field Values

ON_EXCEPTION_ACTION

public static final int ON_EXCEPTION_ACTION
See Also:
Constant Field Values
Constructor Detail

JMSVendorAdapter

public JMSVendorAdapter()
Method Detail

addVendorConnectionFactoryProperties

public abstract void addVendorConnectionFactoryProperties(JMSURLHelper jmsurl,
                                                          HashMap cfProps)

setupApplicationProperties

public void setupApplicationProperties(MessageContext context,
                                       JMSURLHelper jmsurl)

setupMessageContext

public void setupMessageContext(MessageContext context,
                                JMSURLHelper jmsurl)
Set JMS properties in the message context.

TODO: just copy all properties that are not used for the JMS connector or connection factory


getJMSConnectionFactoryProperties

public HashMap getJMSConnectionFactoryProperties(JMSURLHelper jmsurl)
Creates a connection factory property table using values supplied in the endpoint address

Parameters:
jmsurl - the endpoint address
Returns:
the set of properties to be used for instantiating the connection factory

getJMSConnectorProperties

public HashMap getJMSConnectorProperties(JMSURLHelper jmsurl)
Creates a JMS connector property table using values supplied in the endpoint address. Properties are translated from the short form in the endpoint address to the long form (prefixed by "transport.jms.")

Parameters:
jmsurl - the endpoint address
Returns:
the set of properties to be used for instantiating the JMS connector

getQueue

public javax.jms.Queue getQueue(javax.jms.QueueSession session,
                                String name)
                         throws Exception
Throws:
Exception

getQueueConnectionFactory

public abstract javax.jms.QueueConnectionFactory getQueueConnectionFactory(HashMap cfProps)
                                                                    throws Exception
Throws:
Exception

getTopic

public javax.jms.Topic getTopic(javax.jms.TopicSession session,
                                String name)
                         throws Exception
Throws:
Exception

getTopicConnectionFactory

public abstract javax.jms.TopicConnectionFactory getTopicConnectionFactory(HashMap cfProps)
                                                                    throws Exception
Throws:
Exception

getVendorId

public String getVendorId()

isMatchingConnectionFactory

public abstract boolean isMatchingConnectionFactory(javax.jms.ConnectionFactory cf,
                                                    JMSURLHelper jmsurl,
                                                    HashMap cfProps)

isRecoverable

public boolean isRecoverable(Throwable thrown,
                             int action)

setProperties

public void setProperties(javax.jms.Message message,
                          HashMap props)
                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException