public class JMSMessage
extends java.lang.Object
Constructor and Description |
---|
JMSMessage()
Default constructor.
|
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.
|
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