teamworks

Class JMSMessage

  • java.lang.Object
    • teamworks.JMSMessage


  • public class JMSMessage
    extends java.lang.Object
    The JMSMessage class can be used to add messages to a JMS queue and to receive messages from a JMS queue.
    Use this class for all JMS providers except IBM MQ.
    JMSMessage does not support the Secure Sockets Layer (SSL).
    • Constructor Summary

      Constructors 
      Constructor and Description
      JMSMessage()
      Default constructor.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String getMessage(java.lang.String initialContext, java.lang.String providerUrl, java.lang.String connectionFactory, java.lang.String queueName, java.lang.Boolean lookup, java.lang.String filter)
      Retrieves the message from the JMS Queue.
      void putMessage(java.lang.String initialContext, java.lang.String providerUrl, java.lang.String messageContent, java.lang.String connectionFactory, java.lang.String queueName, java.lang.Boolean lookup, java.util.HashMap properties)
      Adds a message to a JMS Queue.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JMSMessage

        public JMSMessage()
        Default constructor.
    • Method Detail

      • putMessage

        public void putMessage(java.lang.String initialContext,
                      java.lang.String providerUrl,
                      java.lang.String messageContent,
                      java.lang.String connectionFactory,
                      java.lang.String queueName,
                      java.lang.Boolean lookup,
                      java.util.HashMap properties)
                        throws javax.naming.NamingException,
                               javax.jms.JMSException
        Adds a message to a JMS Queue.
        Parameters:
        initialContext - the name of the initial context factory class to use when performing JNDI lookups. This value is used to set the java.naming.context.initial property when creating the InitialContext.
        providerUrl - a reference to the naming provider to be used for JNDI lookups. This value is used to set the java.naming.provider.url property when creating the IntiailContext.
        messageContent - the content of the message to be added to the specified queue
        connectionFactory - the JNDI name of the connection factory to use when establishing a connection to the messaging provider
        queueName - the name of the queue to which the message should be added.
        lookup - a flag which indicates whether to lookup the queue via JNDI or create it. If specified as true, then queueName represents the JNDI name of the queue to be looked up. If specified as false, then queueName represents the name of the queue to be created.
        properties - a collection of properties to be added to the JMS Message.
        Throws:
        javax.naming.NamingException
        javax.jms.JMSException
      • getMessage

        public java.lang.String getMessage(java.lang.String initialContext,
                                  java.lang.String providerUrl,
                                  java.lang.String connectionFactory,
                                  java.lang.String queueName,
                                  java.lang.Boolean lookup,
                                  java.lang.String filter)
                                    throws javax.naming.NamingException,
                                           javax.jms.JMSException
        Retrieves the message from the JMS Queue.
        Parameters:
        initialContext - the name of the initial context factory class to use when performing JNDI lookups. This value is used to set the java.naming.context.initial property when creating the InitialContext.
        providerUrl - a reference to the naming provider to be used for JNDI lookups. This value is used to set the java.naming.provider.url property when creating the IntiailContext.
        connectionFactory - the JNDI name of the connection factory to use when establishing a connection to the messaging provider
        queueName - the name of the queue to which the message should be added.
        lookup - a flag which indicates whether to lookup the queue via JNDI or create it. If specified as true, then queueName represents the JNDI name of the queue to be looked up. If specified as false, then queueName represents the name of the queue to be created.
        filter - the filter to use when receiving the message from the queue. If specified as null, then no filter is used.
        Returns:
        java.lang.String
        Throws:
        javax.naming.NamingException
        javax.jms.JMSException
IBM Business Process ManagerTM
Release 8