Class JMSUtils
java.lang.Object
org.wso2.carbon.inbound.endpoint.protocol.jms.JMSUtils
Maintain the common methods used by inbound JMS protocol
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvertXMLtoJMSMap(org.apache.axiom.om.OMElement element, javax.jms.MapMessage message) getTransportHeaders(javax.jms.Message message, org.apache.axis2.context.MessageContext msgContext) Extract transport level headers from JMS message into a Mapprotected static voidstatic StringinferJMSMessageType(javax.jms.Message msg) Method to infer the JMS message type.static javax.jms.DestinationlookupDestination(Context context, String destinationName, String destinationType) Return the JMS destination with the given destination name looked up from the contextstatic voidsetTransportHeaders(org.apache.axis2.context.MessageContext msgContext, javax.jms.Message message) Set transport headers from the axis message context, into the JMS message
-
Constructor Details
-
JMSUtils
public JMSUtils()
-
-
Method Details
-
inferJMSMessageType
Method to infer the JMS message type.- Parameters:
msg- the message to be inferred- Returns:
- the type of the JMS message
-
convertXMLtoJMSMap
public static void convertXMLtoJMSMap(org.apache.axiom.om.OMElement element, javax.jms.MapMessage message) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
setTransportHeaders
public static void setTransportHeaders(org.apache.axis2.context.MessageContext msgContext, javax.jms.Message message) throws javax.jms.JMSException Set transport headers from the axis message context, into the JMS message- Parameters:
msgContext- the axis message contextmessage- the JMS Message- Throws:
javax.jms.JMSException- on exception
-
lookupDestination
public static javax.jms.Destination lookupDestination(Context context, String destinationName, String destinationType) throws NamingException Return the JMS destination with the given destination name looked up from the context- Parameters:
context- the Context to lookupdestinationName- name of the destination to be looked updestinationType- type of the destination to be looked up- Returns:
- the JMS destination, or null if it does not exist
- Throws:
NamingException
-
handleException
- Throws:
NamingException
-
getTransportHeaders
public static Map<String,Object> getTransportHeaders(javax.jms.Message message, org.apache.axis2.context.MessageContext msgContext) Extract transport level headers from JMS message into a Map- Parameters:
message- JMS messagemsgContext- axis2 message context- Returns:
- a Map of the transport headers
-