org.apache.axis2.transport.jms
Class JMSUtils

java.lang.Object
  extended by org.apache.axis2.transport.jms.JMSUtils

public class JMSUtils
extends java.lang.Object


Constructor Summary
JMSUtils()
           
 
Method Summary
static java.lang.String getContentType(MessageContext msgCtx)
          Get the context type from the Axis MessageContext
static java.lang.String getDestination(AxisService service)
          Get the JMS destination used by this service
static java.lang.String getDestination(java.lang.String url)
          Return the destination name from the given URL
static java.io.InputStream getInputStream(javax.jms.Message message)
          Get an InputStream to the message
static java.util.Hashtable getProperties(java.lang.String url)
          Extract connection factory properties from a given URL
static java.lang.String getProperty(javax.jms.Message message, java.lang.String property)
          Get a String property from the JMS message
static org.apache.axiom.soap.SOAPEnvelope getSOAPEnvelope(javax.jms.Message message, MessageContext msgContext, java.io.InputStream in)
          Return a SOAPEnvelope created from the given JMS Message and Axis MessageContext, and the InputStream into the message
static boolean isJMSService(AxisService service)
          Should this service be enabled on JMS transport?
static void markServiceAsFaulty(java.lang.String serviceName, java.lang.String msg, AxisConfiguration axisCfg)
          Marks the given service as faulty with the given comment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSUtils

public JMSUtils()
Method Detail

isJMSService

public static boolean isJMSService(AxisService service)
Should this service be enabled on JMS transport?

Parameters:
service - the Axis service
Returns:
true if JMS should be enabled

getDestination

public static java.lang.String getDestination(AxisService service)
Get the JMS destination used by this service

Parameters:
service - the Axis Service
Returns:
the name of the JMS destination

getProperties

public static java.util.Hashtable getProperties(java.lang.String url)
Extract connection factory properties from a given URL

Parameters:
url - a JMS URL of the form jms:/?[=&]*
Returns:
a Hashtable of extracted properties

markServiceAsFaulty

public static void markServiceAsFaulty(java.lang.String serviceName,
                                       java.lang.String msg,
                                       AxisConfiguration axisCfg)
Marks the given service as faulty with the given comment

Parameters:
serviceName - service name
msg - comment for being faulty
axisCfg - configuration context

getInputStream

public static java.io.InputStream getInputStream(javax.jms.Message message)
Get an InputStream to the message

Parameters:
message - the JMS message
Returns:
an InputStream

getProperty

public static java.lang.String getProperty(javax.jms.Message message,
                                           java.lang.String property)
Get a String property from the JMS message

Parameters:
message - JMS message
property - property name
Returns:
property value

getContentType

public static java.lang.String getContentType(MessageContext msgCtx)
Get the context type from the Axis MessageContext

Parameters:
msgCtx - message context
Returns:
the content type

getDestination

public static java.lang.String getDestination(java.lang.String url)
Return the destination name from the given URL

Parameters:
url - the URL
Returns:
the destination name

getSOAPEnvelope

public static org.apache.axiom.soap.SOAPEnvelope getSOAPEnvelope(javax.jms.Message message,
                                                                 MessageContext msgContext,
                                                                 java.io.InputStream in)
                                                          throws javax.xml.stream.XMLStreamException
Return a SOAPEnvelope created from the given JMS Message and Axis MessageContext, and the InputStream into the message

Parameters:
message - the JMS Message
msgContext - the Axis MessageContext
in - the InputStream into the message
Returns:
SOAPEnvelope for the message
Throws:
javax.xml.stream.XMLStreamException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.