com.ibm.mq.jms

Class MQDestination

  • java.lang.Object
    • com.ibm.msg.client.jms.internal.JmsReadablePropertyContextImpl
      • com.ibm.msg.client.jms.internal.JmsPropertyContextImpl
        • com.ibm.msg.client.jms.admin.JmsDestinationImpl
          • com.ibm.msg.client.jms.admin.JmsJndiDestinationImpl
            • com.ibm.mq.jms.MQDestination
  • All Implemented Interfaces:
    com.ibm.jms.JMSDestination, JmsDestination, JmsPropertyContext, JmsReadablePropertyContext, com.ibm.msg.client.provider.ProviderPropertyContextCallback, java.io.Serializable, java.util.Map<java.lang.String,java.lang.Object>, javax.jms.Destination, javax.naming.Referenceable
    Direct Known Subclasses:
    MQQueue, MQTopic


    public class MQDestination
    extends com.ibm.msg.client.jms.admin.JmsJndiDestinationImpl
    implements javax.jms.Destination, com.ibm.jms.JMSDestination, java.io.Serializable
    An MQDestination object encapsulates a provider-specific address.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K,V>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getAlternateUserId()
      Gets the alternate user id for the destination.
      int getCCSID()
      Gets the number of the character set that is used by this destination for sending messages.
      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 getMessageBodyStyle()
      Gets the value of the message body style for messages sent to or received from this destination.
      int getMQMDMessageContext()
      Gets the value of the message context options for messages sent to this destination.
      boolean getMQMDReadEnabled()
      Whether JMS_IBM_MQMD* properties are set on messages sent to or received messages from this destination based on the MQMD fields, after the send operation or during the receive operation.
      boolean getMQMDWriteEnabled()
      Whether JMS_IBM_MQMD* properties on messages sent to this destination modify the MQMD fields prior to the send operation.
      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.
      int getPutAsyncAllowed()
      Indicates whether asynchronous puts are allowed on this destination
      int getReadAheadAllowed()
      Indicates whether read ahead is allowed on this destination
      int getReadAheadClosePolicy()
      Indicates whether a read ahead buffer should be drained by asynchronous consumers on close, when reading from this destination, or whether the current running callback should complete and allow other messages to stay on the buffer (to be discarded)
      int getReceiveCCSID()
      Gets the number of the character set that is used when receiving messages from this destination.
      int getReceiveConversion()
      Determines if the QueueManager is asked to convert messages before retrieval.
      javax.naming.Reference getReference()
      Returns a reference object to enable this object to be stored in JNDI.
      int getReplyToStyle()
      Get the ReplyToStyle.
      java.lang.String getStringFromDestination()
      Produces a transport-dependent string that encapsulates the properties of the destination.
      int getTargetClient()
      Gets the JMS compliance indicator flag.
      java.lang.String getUnmappableAction()
      Gets the action to be taken for unmappable characters when sending messages to this destination
      byte getUnmappableReplacement()
      Gets the byte to be used for unmappable characters when sending messages to this destination
      int getWildcardFormat()
      Gets the formatting accepted when using wildcards.
      void setAlternateUserId(java.lang.String altuser)
      Sets an alternate user id for the destination.
      void setCCSID(int ccsid)
      Sets the number of the character set that is used by this destination for sending messages.
      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 setMessageBodyStyle(int bodyStyle)
      Sets the value for the message body style for messages sent to or received from this destination.
      void setMQMDMessageContext(int messageContext)
      Sets the value of the message context options for messages sent to this destination.
      void setMQMDReadEnabled(boolean readEnabled)
      Whether JMS_IBM_MQMD* properties are set on messages sent to or received messages from this destination based on the MQMD fields, after the send operation or during the receive operation.
      void setMQMDWriteEnabled(boolean writeEnabled)
      Whether JMS_IBM_MQMD* properties on messages sent to this destination modify the MQMD fields prior to the send operation.
      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 setPutAsyncAllowed(int paa)
      Sets whether asynchronous puts are allowed on this destination
      void setReadAheadAllowed(int raa)
      Sets whether read ahead is allowed on this destination
      void setReadAheadClosePolicy(int racp)
      Sets whether a read ahead buffer should be drained by asynchronous consumers on close, when reading from this destination, or whether the current running callback should complete and allow other messages to stay on the buffer (to be discarded)
      void setReceiveCCSID(int ccsid)
      Sets the number of the character set that is used when receiving messages from this destination.
      void setReceiveConversion(int rcnvc)
      Controls if the queuemanager is asked to convert messages before retrieval.
      void setReplyToStyle(int style)
      Set the ReplyToStyle.
      void setTargetClient(int targetClient)
      Sets a flag indicating whether the remote application supports JMS.
      void setUnmappableAction(java.lang.String unmappableAction)
      Sets the action to be taken for unmappable characters when sending messages to this destination
      void setUnmappableReplacement(java.lang.Byte unmappableReplacement)
      Sets the byte to be used for unmappable characters when sending messages to this destination
      void setWildcardFormat(int format)
      Sets the formatting to accept when using wildcards.
      • Methods inherited from class com.ibm.msg.client.jms.admin.JmsDestinationImpl

        equals, getQueueName, getTopicName, hashCode, setStringProperty, toString
      • Methods inherited from class com.ibm.msg.client.jms.internal.JmsPropertyContextImpl

        clear, containsKey, containsValue, entrySet, get, getObjectProperty, isEmpty, keySet, propertyExists, put, putAll, remove, setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setProviderPropertyContext, setShortProperty, size, values
      • Methods inherited from class com.ibm.msg.client.jms.internal.JmsReadablePropertyContextImpl

        dump, getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getPropertyNames, getShortProperty, getStringProperty
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Method Detail

      • getAlternateUserId

        public java.lang.String getAlternateUserId()
        Gets the alternate user id for the destination.
        Returns:
        the alternate user id.
      • getCCSID

        public int getCCSID()
        Gets the number of the character set that is used by this destination for sending messages.
        Returns:
        the CCSID.
      • getUnmappableAction

        public java.lang.String getUnmappableAction()
                                             throws javax.jms.JMSException
        Gets the action to be taken for unmappable characters when sending messages to this destination
        Returns:
        the name of the action to be used
        Throws:
        javax.jms.JMSException
      • getUnmappableReplacement

        public byte getUnmappableReplacement()
                                      throws javax.jms.JMSException
        Gets the byte to be used for unmappable characters when sending messages to this destination
        Returns:
        unmappableReplacement the byte to be used
        Throws:
        javax.jms.JMSException
      • getDescription

        public java.lang.String getDescription()
        Gets the description of the destination.
        Returns:
        the description.
      • getEncoding

        public int getEncoding()
        Gets the encoding that is used for this destination.
        Returns:
        the encoding.
      • getExpiry

        public long getExpiry()
        Gets the value of the expiry for this destination.
        Returns:
        the expiry time (milliseconds).
      • getMQMDWriteEnabled

        public boolean getMQMDWriteEnabled()
                                    throws javax.jms.JMSException
        Whether JMS_IBM_MQMD* properties on messages sent to this destination modify the MQMD fields prior to the send operation.
        Returns:
        true or false
        Throws:
        javax.jms.JMSException
      • getMQMDReadEnabled

        public boolean getMQMDReadEnabled()
                                   throws javax.jms.JMSException
        Whether JMS_IBM_MQMD* properties are set on messages sent to or received messages from this destination based on the MQMD fields, after the send operation or during the receive operation.
        Returns:
        true or false
        Throws:
        javax.jms.JMSException
      • getPersistence

        public int getPersistence()
        Gets the value of the persistence of all messages sent to this destination.
        Returns:
        the value of persistence.
      • 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)
      • getReadAheadClosePolicy

        public int getReadAheadClosePolicy()
                                    throws javax.jms.JMSException
        Indicates whether a read ahead buffer should be drained by asynchronous consumers on close, when reading from this destination, or whether the current running callback should complete and allow other messages to stay on the buffer (to be discarded)
        Returns:
        possible values are:
        Throws:
        javax.jms.JMSException
      • getReference

        public javax.naming.Reference getReference()
                                            throws javax.naming.NamingException
        Returns a reference object to enable this object to be stored in JNDI.
        Specified by:
        getReference in interface javax.naming.Referenceable
        Overrides:
        getReference in class com.ibm.msg.client.jms.admin.JmsJndiDestinationImpl
        Returns:
        the reference object
        Throws:
        javax.naming.NamingException
      • getStringFromDestination

        public java.lang.String getStringFromDestination()
        Produces a transport-dependent string that encapsulates the properties of the destination. This returns the full URI of the destination.
        Specified by:
        getStringFromDestination in interface com.ibm.jms.JMSDestination
        Returns:
        String URI of the destination.
      • getWildcardFormat

        public int getWildcardFormat()
                              throws javax.jms.JMSException
        Gets the formatting accepted when using wildcards.
        Returns:
        property applicable to all instances of Destination and Topic. In the v6 implementation, where publish/subscribe messaging is performed via a broker, different topic wildcard syntax is used depending on which broker is used. In v7, using native publish/subscribe within the queue manager, the wildcard syntax can be chosen via this property.
        Throws:
        javax.jms.JMSException - if an internal error occurs.
      • setAlternateUserId

        public void setAlternateUserId(java.lang.String altuser)
                                throws javax.jms.JMSException
        Sets an alternate user id for the destination.
        Parameters:
        altuser - alternate user id for the destination.
        Throws:
        javax.jms.JMSException
      • setCCSID

        public void setCCSID(int ccsid)
                      throws javax.jms.JMSException
        Sets the number of the character set that is used by this destination for sending messages.
        Parameters:
        ccsid - the CCSID.
        Throws:
        javax.jms.JMSException - if ccsid is invalid.
      • setUnmappableAction

        public void setUnmappableAction(java.lang.String unmappableAction)
                                 throws javax.jms.JMSException
        Sets the action to be taken for unmappable characters when sending messages to this destination
        Parameters:
        unmappableAction - the name of the action to be used
        Throws:
        javax.jms.JMSException
      • setUnmappableReplacement

        public void setUnmappableReplacement(java.lang.Byte unmappableReplacement)
                                      throws javax.jms.JMSException
        Sets the byte to be used for unmappable characters when sending messages to this destination
        Parameters:
        unmappableReplacement - the byte to be used
        Throws:
        javax.jms.JMSException
      • setDescription

        public void setDescription(java.lang.String description)
        Sets a description of the destination.
        Parameters:
        description - the description for the destination.
      • 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.
        Throws:
        javax.jms.JMSException - if encoding is not valid.
      • 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.
      • 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.
      • setMQMDWriteEnabled

        public void setMQMDWriteEnabled(boolean writeEnabled)
                                 throws javax.jms.JMSException
        Whether JMS_IBM_MQMD* properties on messages sent to this destination modify the MQMD fields prior to the send operation.
        Parameters:
        writeEnabled - true or false
        Throws:
        javax.jms.JMSException - if the value cannot be set
      • setMQMDReadEnabled

        public void setMQMDReadEnabled(boolean readEnabled)
                                throws javax.jms.JMSException
        Whether JMS_IBM_MQMD* properties are set on messages sent to or received messages from this destination based on the MQMD fields, after the send operation or during the receive operation.
        Parameters:
        readEnabled - true or false
        Throws:
        javax.jms.JMSException - if the value cannot be set
      • 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.
        Throws:
        javax.jms.JMSException - if persistence is invalid.
      • 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
      • 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 ProviderDestination 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 when 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.
      • setReadAheadClosePolicy

        public void setReadAheadClosePolicy(int racp)
                                     throws javax.jms.JMSException
        Sets whether a read ahead buffer should be drained by asynchronous consumers on close, when reading from this destination, or whether the current running callback should complete and allow other messages to stay on the buffer (to be discarded)
        Parameters:
        racp - possible values are:
        Throws:
        javax.jms.JMSException - if racp is not one of the above.
      • 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:
        Throws:
        javax.jms.JMSException - if the value is invalid
      • setWildcardFormat

        public void setWildcardFormat(int format)
                               throws javax.jms.JMSException
        Sets the formatting to accept when using wildcards.
        Parameters:
        format - property applicable to all instances of ConnectionFactory TopicConnectionFactory and their XA equivalents. In the v6 implementation, where publish/subscribe messaging is performed via a broker, different topic wildcard syntax is used depending on which broker is used. In v7, using native publish/subscribe within the queue manager, the wildcard syntax can be chosen via this property.
        Throws:
        javax.jms.JMSException - if an internal error occurs.
      • setReplyToStyle

        public void setReplyToStyle(int style)
                             throws javax.jms.JMSException
        Set the ReplyToStyle. This determines if style of the JMSReplyTo. It can either be taken direct from the RFH2 or the Destination Name can be determined from the MQMD. If it comes from the RFH2 it will match exactly the value that was set on send. If it comes from the MQMD, any processing that has been applied to the MQMD reply to fields will be reflected. This property is handled when messages are received.
        Parameters:
        style - Permitted values are
        Throws:
        javax.jms.JMSException
      • getReplyToStyle

        public int getReplyToStyle()
                            throws javax.jms.JMSException
        Get the ReplyToStyle. This determines if style of the JMSReplyTo. It can either be taken direct from the RFH2 or the Destination Name can be determined from the MQMD. If it comes from the RFH2 it will match exactly the value that was set on send. This property is handled when messages are received. If it comes from the MQMD, any processing that has been applied to the MQMD reply to fields will be reflected.
        Returns:
        style Permitted values are
        Throws:
        javax.jms.JMSException
(c) Copyright IBM Corp. 2008, 2016. All Rights Reserved.