IBM WebSphere Application ServerTM
Release 8

teamworks
Class MQMessages

java.lang.Object
  extended by teamworks.MQMessages

public class MQMessages
extends java.lang.Object

This MQMessages class can be used to add messages using the MQQueueManager class.
Use this class only if using IBM MQ.
MQMessages does not support the Secure Sockets Layer (SSL).


Constructor Summary
MQMessages()
          Default constructor.
 
Method Summary
 java.lang.String getMessage(java.lang.String hostname, java.lang.String queueManagerName, java.lang.String channel, java.lang.Integer port, java.lang.String queueName)
          Retrieves the message from the MQQueueManager.
 void putMessage(java.lang.String messageContent, java.lang.String hostname, java.lang.String queueManagerName, java.lang.String channel, java.lang.Integer port, java.lang.String queueName)
          Adds a message to the MQQueueManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQMessages

public MQMessages()
Default constructor.

Method Detail

getMessage

public java.lang.String getMessage(java.lang.String hostname,
                                   java.lang.String queueManagerName,
                                   java.lang.String channel,
                                   java.lang.Integer port,
                                   java.lang.String queueName)
                            throws com.ibm.mq.MQException,
                                   java.io.IOException
Retrieves the message from the MQQueueManager.

Parameters:
hostname - The name of the host where the MQQueueManager is running. This value is used to set the com.ibm.mq.MQC.HOST_NAME_PROPERTY property when creating the MQQueueManager.
queueManagerName - the name for the queue manager. This value is used when creating the MQQueueManager.
channel - the name of the channel where the MQQueueManager is running. This value is used to set the com.ibm.mq.MQC.CHANNEL_PROPERTY property when creating the MQQueueManager.
port - the name of the port where the MQQueueManager is running. This value is used to set the com.ibm.mq.MQC.PORT_PROPERTY property when creating the MQQueueManager.
queueName - the name of the queue to which the message should be added.
Returns:
java.lang.String
Throws:
com.ibm.mq.MQException
java.io.IOException

putMessage

public void putMessage(java.lang.String messageContent,
                       java.lang.String hostname,
                       java.lang.String queueManagerName,
                       java.lang.String channel,
                       java.lang.Integer port,
                       java.lang.String queueName)
                throws com.ibm.mq.MQException,
                       java.io.IOException
Adds a message to the MQQueueManager.

Parameters:
messageContent - the content of the message to be added to the specified queue
hostname - The name of the host where the MQQueueManager is running. This value is used to set the com.ibm.mq.MQC.HOST_NAME_PROPERTY property when creating the MQQueueManager.
queueManagerName - the name for the queue manager. This value is used when creating the MQQueueManager.
channel - the name of the channel where the MQQueueManager is running. This value is used to set the com.ibm.mq.MQC.CHANNEL_PROPERTY property when creating the MQQueueManager.
port - the name of the port where the MQQueueManager is running. This value is used to set the com.ibm.mq.MQC.PORT_PROPERTY property when creating the MQQueueManager.
queueName - the name of the queue to which the message should be added.
Throws:
com.ibm.mq.MQException
java.io.IOException

IBM WebSphere Application ServerTM
Release 8