|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectteamworks.JMSMessage
public class JMSMessage
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 | |
---|---|
JMSMessage()
Default constructor. |
Method Summary | |
---|---|
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 |
---|
public JMSMessage()
Method Detail |
---|
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
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 queueconnectionFactory
- the JNDI name of the connection factory to use when establishing a connection to the messaging providerqueueName
- 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.
javax.naming.NamingException
javax.jms.JMSException
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
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 providerqueueName
- 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.
javax.naming.NamingException
javax.jms.JMSException
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |