com.ibm.mq.jms
Class MQDestination

java.lang.Object
  |
  +--com.ibm.mq.jms.MQDestination
All Implemented Interfaces:
javax.jms.Destination, JMSDestination, java.io.Serializable
Direct Known Subclasses:
MQQueue, MQTopic

public abstract class MQDestination
extends java.lang.Object
implements javax.jms.Destination, JMSDestination, java.io.Serializable

An MQDestination object encapsulates a provider-specific address.

See Also:
Serialized Form

Field Summary
   
Method Summary
 boolean equals(java.lang.Object obj)
          Test for equality.
 int getCCSID()
          Gets the number of the character set that is used by this destination.
 java.lang.String getDescription()
          Gets the description of the destination.
 int getEncoding()
          Gets the encoding that is used for this destination.
 long getExpiry()
          Gets the value of the expiry for this destination.
 int getFailIfQuiesce()
          Gets the status of the failIfQuiesce property of this destination.
 int getPersistence()
          Gets the value of the persistence of all messages sent to this destination.
 int getPriority()
          Gets the override priority value.
 java.lang.String getProperty(java.lang.String name)
          Gets the named, user-defined property from the MQDestination URI.
 java.lang.String getStringFromDestination()
          Takes a JMS Destination object and produces a transport-dependent string that encapsulates the properties of the destination.
 int getTargetClient()
          Gets the JMS compliance indicator flag.
 void setCCSID(int ccsid)
          Sets the number of the character set that is used by this destination.
 void setDescription(java.lang.String description)
          Sets a description of the destination.
 void setEncoding(int encoding)
          Sets the encoding to be used for numeric fields in messages sent to this destination.
 void setExpiry(long expiry)
          Sets the expiry of all messages sent to this destination.
 void setFailIfQuiesce(int fiq)
          Sets the behavior of applications accessing a quiescing queue manager with this destination.
 void setPersistence(int persistence)
          Overrides the persistence of all messages sent to this destination.
 void setPriority(int priority)
          Overrides the priority of all messages sent to this destination.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets an arbitrary, user-defined property.
 void setTargetClient(int targetClient)
          Sets a flag indicating whether the remote application supports JMS.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFailIfQuiesce

public int getFailIfQuiesce()
Gets the status of the failIfQuiesce property of this destination.

Returns:
possible values are:

setFailIfQuiesce

public void setFailIfQuiesce(int fiq)
                      throws javax.jms.JMSException
Sets the behavior of applications accessing a quiescing queue manager with this destination.

Parameters:
fiq - possible values are:
Throws:
javax.jms.JMSException - if fiq is not one of the above.

getDescription

public java.lang.String getDescription()
Gets the description of the destination.

Returns:
the description.

setDescription

public void setDescription(java.lang.String description)
Sets a description of the destination.

Parameters:
description - the description for the destination.

getPriority

public int getPriority()
Gets the override priority value.

Returns:
the new priority. Possible values are:

setPriority

public void setPriority(int priority)
                 throws javax.jms.JMSException
Overrides the priority of all messages sent to this destination.

Parameters:
priority - the new priority. Possible values are:
Throws:
javax.jms.JMSException - if the value is invalid

getExpiry

public long getExpiry()
Gets the value of the expiry for this destination.

Returns:
the expiry time (milliseconds).

setExpiry

public void setExpiry(long expiry)
               throws javax.jms.JMSException
Sets the expiry of all messages sent to this destination.

Parameters:
expiry - the expiry time (milliseconds).
Throws:
javax.jms.JMSException - if expiry is not valid.

getPersistence

public int getPersistence()
Gets the value of the persistence of all messages sent to this destination.

Returns:
the value of persistence. See MQMD.persistence

setPersistence

public void setPersistence(int persistence)
                    throws javax.jms.JMSException
Overrides the persistence of all messages sent to this destination.

Parameters:
persistence - the value of persistence. See MQMD.persistence
Throws:
javax.jms.JMSException - if persistence is invalid.

getTargetClient

public int getTargetClient()
Gets the JMS compliance indicator flag.

Returns:
possible values are:

setTargetClient

public void setTargetClient(int targetClient)
                     throws javax.jms.JMSException
Sets a flag indicating whether the remote application supports JMS.

Parameters:
targetClient - the value of the flag. Possible values are:

getCCSID

public int getCCSID()
Gets the number of the character set that is used by this destination.

Returns:
the CCSID. See MQMD.characterSet.

setCCSID

public void setCCSID(int ccsid)
              throws javax.jms.JMSException
Sets the number of the character set that is used by this destination.

Parameters:
ccsid - the CCSID. See MQMD.characterSet.
Throws:
javax.jms.JMSException - if ccsid is invalid.

getEncoding

public int getEncoding()
Gets the encoding that is used for this destination.

Returns:
the encoding. See MQMD.encoding.

setEncoding

public void setEncoding(int encoding)
                 throws javax.jms.JMSException
Sets the encoding to be used for numeric fields in messages sent to this destination.

Parameters:
encoding - the encoding. See MQMD.encoding.
Throws:
javax.jms.JMSException - if encoding is not valid.

getProperty

public java.lang.String getProperty(java.lang.String name)
Gets the named, user-defined property from the MQDestination URI.

Parameters:
name - The name of the property.
Returns:
the value of the named property or null if this property has not been defined.
See Also:
setProperty(java.lang.String, java.lang.String)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets an arbitrary, user-defined property. This property is added to the URI string that is returned by calling getStringFromDestination(). Names and values for such properties must conform to the following rules:

Names can contain any character, but '=', '%' and '&' characters will be escaped using standard URI syntax (that is, %3d, %25 and %26 respectively) when they are added to the Destination URI string.
Names beginning with the characters 'ibm' are reserved for IBM internal use only.
The names of existing MQDestination properties (for example, priority, CCSID or brokerVersion) are also reserved.
Values can contain any character but '%' and '&' characters will be escaped using standard URI syntax when they are added to the Destination URI string.

Destination URI strings that cannot be decoded due to syntax errors will result in a JMSException with reason MQJMS_EXCEPTION_INVALID_DESTINATION being thrown.

Names and Values added using the setProperty() method must not have any '=', '%' and '&' characters replaced by escape sequences as this will be done they are added to the Destination URI string.
If this method is used on a 1.3.1 JDK or lower, the Names and Values added will not be escaped and will be added to the Destination URI as they are. This can cause unpredictable results if the Names or Values contain unescaped '=', '%' or '&' characters. For example, they might result in a JMSException being thrown or they might cause additional erroneous properties to be defined in the MQDestination object.

Parameters:
name - The name of the property.
value - The value of the property.

equals

public boolean equals(java.lang.Object obj)
Test for equality.

Overrides:
equals in class java.lang.Object

getStringFromDestination

public java.lang.String getStringFromDestination()
Takes a JMS Destination object and produces a transport-dependent string that encapsulates the properties of the destination.

Specified by:
getStringFromDestination in interface JMSDestination
Returns:
String version of the destination.

(c) Copyright IBM Corp. 2005. All Rights Reserved.