|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.jms.MQeDestination | +--com.ibm.mqe.jms.MQeJMSQueue
A Queue
object encapsulates a provider-specific queue name. It is the
way a client specifies the identity of queue to JMS methods.
WebSphere MQ Everplace JMS queues are named using a combination of the MQ Everyplace queue manager name, a plus sign and the name of the MQ Everyplace queue, for example
ServerQM+testQ
However, if the queue is local then the queue manager name and plus sign may be omitted and the queue name can be used on its own. When referring to local queues, the short form
SYSTEM.DEFAULT.LOCAL.QUEUE
and long forms
LocalQM+SYSTEM.DEFAULT.LOCAL.QUEUE
are equivalent. When querying Queue names (e.g. getQueueName()
the name is always
returned in this format. However, for convenience Constructors are provided taking either a
single String in this format or a pair of strings containing the Queue Manager and Queue names
which are converted internally to a MQ Everyplace JMS queue name. As is usual with
MQ Everyplace a null value for the Queue Manager name is interpreted as a reference to the local
Queue Manager.
Note that a MQeJMSQueue
object cannot be stored and retrieved using JNDI - this allows
this class to be used on small devices where lookup of JNDI administered objects is either
impractical or represents unnecessary overhead. MQeJMSJNDIQueue
extends
this class to include support for JNDI.
More information on configuring an MQeJMSQueue can be found in Chapter 10 of the WebSphere MQ Everyplace Application Programming Guide.
Constructor Summary | |
MQeJMSQueue()
A default constructor for use by the MQeJMSQueueFactory and the JMS Administration tool. |
|
MQeJMSQueue(java.lang.String jmsQueueName)
Create a new instance of an MQeJMSQueue. |
|
MQeJMSQueue(java.lang.String mqeQMgrName,
java.lang.String mqeQueueName)
Create a new instance of an MQeJMSQueue. |
Method Summary | |
boolean |
getMQNative()
This method returns true if this destination corresponds to a native WebSphere MQ queue. |
java.lang.String |
getQueueName()
Get the name of this queue. |
void |
setMQNative(boolean isMQNative)
If MQNative is set to true, then JMS messages sent to this destination will be converted to an MQeMQMsgObject suitable for traditional non-JMS WebSphere MQ applications. |
java.lang.String |
toString()
Return a formatted version of the queue name. |
Methods inherited from class com.ibm.mqe.jms.MQeDestination |
getDescription, setDescription |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MQeJMSQueue()
public MQeJMSQueue(java.lang.String jmsQueueName) throws javax.jms.JMSException
jmsQueueName
- The name of the JMS Queue.
javax.jms.InvalidDestinationException
- if the JMS queue name is invalid
javax.jms.JMSException
public MQeJMSQueue(java.lang.String mqeQMgrName, java.lang.String mqeQueueName) throws javax.jms.JMSException
mqeQMgrName
- The name of the associated MQe Queue Manager. If this is null then the local
queue manager is used.mqeQueueName
- The name of the associated MQe Queue
javax.jms.InvalidDestinationException
- if the MQe queue name is invalid
javax.jms.JMSException
Method Detail |
public java.lang.String getQueueName() throws javax.jms.JMSException
Note that the naming convention used here is specific to WebSphere MQ Everyplace JMS, and applications that depend upon the format of the returned String are not portable.
getQueueName
in interface javax.jms.Queue
javax.jms.JMSException
- if JMS implementation for Queue fails to
to return queue name due to some internal
error.public java.lang.String toString()
toString
in interface javax.jms.Queue
toString
in class java.lang.Object
public void setMQNative(boolean isMQNative)
MQNative is set to false by default.
Note that MQNative should be false
if this message is
going to a WebSphere MQ JMS application.
public boolean getMQNative()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |