| java.lang.Object org.apache.synapse.transport.base.BaseUtils org.apache.synapse.transport.jms.JMSUtils
JMSUtils | public class JMSUtils extends BaseUtils (Code) | | Miscallaneous methods used for the JMS transport
|
Method Summary | |
public static Connection | createConnection(ConnectionFactory conFactory, String user, String pass, String destinationType) | public static MessageConsumer | createConsumer(Session session, Destination dest) | public static Destination | createDestination(Session session, String destName, String destinationType) | public static void | createDestination(ConnectionFactory conFactory, String destinationJNDIName, String destinationType) | public static Destination | createDestinationIfRequired(Destination destination, String destinationType, String targetAddress, Session session) | public static String | createJMSQueue(Connection con, String destinationJNDIName) | public static String | createJMSTopic(Connection con, String destinationJNDIName) | public static Session | createSession(Connection con, boolean transacted, int acknowledgeMode, String destinationType) | public static Destination | createTemporaryDestination(Session session) | public static String | getDestination(String url) | public static String | getDestinationTypeForService(AxisService service) | static String | getEPR(JMSConnectionFactory cf, String destination) | public InputStream | getInputStream(Object message) | public static BaseUtils | getInstace() | public static String | getJNDIDestinationNameForService(AxisService service) | public byte[] | getMessageBinaryPayload(Object message) | public String | getMessageTextPayload(Object message) | public static Hashtable | getProperties(String url) | public String | getProperty(Object message, String property) | public static Map | getTransportHeaders(Message message) | public static boolean | isJMSService(AxisService service) | public static void | loadTransportHeaders(Message message, MessageContext responseMsgCtx) | public static void | sendMessageToJMSDestination(Session session, Destination destination, String destinationType, Message message) | public static void | setConnectionFactoryParameters(Parameter param, JMSConnectionFactory jmsConFactory) | public static Destination | setReplyDestination(Destination replyDestination, Session session, Message message) | public static void | setTransportHeaders(MessageContext msgContext, Message message) |
createConnection | public static Connection createConnection(ConnectionFactory conFactory, String user, String pass, String destinationType) throws JMSException(Code) | | |
createConsumer | public static MessageConsumer createConsumer(Session session, Destination dest) throws JMSException(Code) | | |
createDestination | public static Destination createDestination(Session session, String destName, String destinationType) throws JMSException(Code) | | |
createDestination | public static void createDestination(ConnectionFactory conFactory, String destinationJNDIName, String destinationType) throws JMSException(Code) | | |
createDestinationIfRequired | public static Destination createDestinationIfRequired(Destination destination, String destinationType, String targetAddress, Session session) throws AxisFault(Code) | | When trying to send a message to a destination, if it does not exist, try to create it
Parameters: destination - the JMS destination to send messages Parameters: targetAddress - the target JMS EPR to find the Destination to be created if required Parameters: session - the JMS session to use the JMS Destination where messages could be posted throws: AxisFault - if the target Destination does not exist and cannot be created |
createJMSQueue | public static String createJMSQueue(Connection con, String destinationJNDIName) throws JMSException(Code) | | Create a JMS Queue using the given connection with the JNDI destination name, and return the
JMS Destination name of the created queue
Parameters: con - the JMS Connection to be used Parameters: destinationJNDIName - the JNDI name of the Queue to be created the JMS Destination name of the created Queue throws: JMSException - on error |
createJMSTopic | public static String createJMSTopic(Connection con, String destinationJNDIName) throws JMSException(Code) | | Create a JMS Topic using the given connection with the JNDI destination name, and return the
JMS Destination name of the created queue
Parameters: con - the JMS Connection to be used Parameters: destinationJNDIName - the JNDI name of the Topic to be created the JMS Destination name of the created Topic throws: JMSException - on error |
createSession | public static Session createSession(Connection con, boolean transacted, int acknowledgeMode, String destinationType) throws JMSException(Code) | | |
createTemporaryDestination | public static Destination createTemporaryDestination(Session session) throws JMSException(Code) | | |
getDestination | public static String getDestination(String url)(Code) | | Return the destination name from the given URL
Parameters: url - the URL the destination name |
getDestinationTypeForService | public static String getDestinationTypeForService(AxisService service)(Code) | | Get the JMS destination type of this service
Parameters: service - the Axis Service the name of the JMS destination |
getEPR | static String getEPR(JMSConnectionFactory cf, String destination)(Code) | | Get the EPR for the given JMS connection factory and destination
the form of the URL is
jms:/?[=&]*
Parameters: cf - the Axis2 JMS connection factory Parameters: destination - the JNDI name of the destination the EPR as a String |
getInputStream | public InputStream getInputStream(Object message)(Code) | | Get an InputStream to the JMS message payload
Parameters: message - the JMS message an InputStream to the payload |
getJNDIDestinationNameForService | public static String getJNDIDestinationNameForService(AxisService service)(Code) | | Get the JMS destination used by this service
Parameters: service - the Axis Service the name of the JMS destination |
getMessageBinaryPayload | public byte[] getMessageBinaryPayload(Object message)(Code) | | |
getProperties | public static Hashtable getProperties(String url)(Code) | | Extract connection factory properties from a given URL
Parameters: url - a JMS URL of the form jms:/?[=&]* a Hashtable of extracted properties |
getProperty | public String getProperty(Object message, String property)(Code) | | Get a String property from the JMS message
Parameters: message - JMS message Parameters: property - property name property value |
getTransportHeaders | public static Map getTransportHeaders(Message message)(Code) | | Extract transport level headers for JMS from the given message into a Map
Parameters: message - the JMS message a Map of the transport headers |
isJMSService | public static boolean isJMSService(AxisService service)(Code) | | Should this service be enabled over the JMS transport?
Parameters: service - the Axis service true if JMS should be enabled |
loadTransportHeaders | public static void loadTransportHeaders(Message message, MessageContext responseMsgCtx) throws AxisFault(Code) | | Read the transport headers from the JMS Message and set them to the axis2 message context
Parameters: message - the JMS Message received Parameters: responseMsgCtx - the axis message context throws: AxisFault - on error |
sendMessageToJMSDestination | public static void sendMessageToJMSDestination(Session session, Destination destination, String destinationType, Message message) throws AxisFault(Code) | | Send the given message to the Destination using the given session
Parameters: session - the session to use to send Parameters: destination - the Destination Parameters: message - the JMS Message throws: AxisFault - on error |
setConnectionFactoryParameters | public static void setConnectionFactoryParameters(Parameter param, JMSConnectionFactory jmsConFactory)(Code) | | Set JNDI properties and any other connection factory parameters to the connection factory
passed in, looing at the parameter in axis2.xml
Parameters: param - the axis parameter that holds the connection factory settings Parameters: jmsConFactory - the JMS connection factory to which the parameters should be applied |
setReplyDestination | public static Destination setReplyDestination(Destination replyDestination, Session session, Message message)(Code) | | Set the JMS ReplyTo for the message
Parameters: replyDestination - the JMS Destination where the reply is expected Parameters: session - the session to use to create a temp Queue if a response is expectedbut a Destination has not been specified Parameters: message - the JMS message where the final Destinatio would be set as the JMS ReplyTo the JMS ReplyTo Destination for the message |
setTransportHeaders | public static void setTransportHeaders(MessageContext msgContext, Message message) throws JMSException(Code) | | Set transport headers from the axis message context, into the JMS message
Parameters: msgContext - the axis message context Parameters: message - the JMS Message throws: JMSException - on exception |
Methods inherited from org.apache.synapse.transport.base.BaseUtils | public static SOAPEnvelope getEnvelope(InputStream in, String namespace) throws XMLStreamException(Code)(Java Doc) abstract public InputStream getInputStream(Object message)(Code)(Java Doc) abstract public byte[] getMessageBinaryPayload(Object message)(Code)(Java Doc) abstract public String getMessageTextPayload(Object message)(Code)(Java Doc) public static long getMinPollTime(List pollTable)(Code)(Java Doc) public static OMOutputFormat getOMOutputFormat(MessageContext msgContext)(Code)(Java Doc) public static String getOptionalServiceParam(AxisService service, String paramName) throws AxisFault(Code)(Java Doc) abstract public String getProperty(Object message, String property)(Code)(Java Doc) public static QName getQNameFromString(Object obj)(Code)(Java Doc) public static String getRequiredServiceParam(AxisService service, String paramName) throws AxisFault(Code)(Java Doc) protected static void handleException(String s)(Code)(Java Doc) protected static void handleException(String s, Exception e)(Code)(Java Doc) public static boolean isUsingTransport(AxisService service, String transportName)(Code)(Java Doc) public static boolean isValid(String str)(Code)(Java Doc) public static void markServiceAsFaulty(String serviceName, String msg, AxisConfiguration axisCfg)(Code)(Java Doc) public void setSOAPEnvelope(Object message, MessageContext msgContext, String contentType) throws AxisFault(Code)(Java Doc)
|
|
|