MQManagedObject.NET class

Use MQManagedObject to inquire and set attributes of MQDestination, MQProcess, MQQueueManager, and MQSubscription. MQManagedObject is a superclass of these classes.


Classes

System.Object
        |
        └─ IBM.WMQ.MQBase
                |
                └─ IBM.WMQ.MQBaseObject
                        |
                        └─ IBM.WMQ.MQManagedObject
                                |
                                └─ IBM.WMQ.MQProcess
                                |
                                └─ IBM.WMQ.MQQueueManager
                                |
                                └─ IBM.WMQ.MQSubscription
                                |
                                └─ IBM.WMQ.MQDestination
public class IBM.WMQ.MQManagedObject extends IBM.WMQ.MQBaseObject;


Properties

Test for MQException being thrown when getting properties.

    public string AlternateUserId {get; set;}
    The alternate user ID, if any, set when the resource was opened. AlternateUserID.set is ignored when issued for an object that is opened. AlternateUserId is not valid for subscriptions.

    public int CloseOptions {get; set;}

    Set this attribute to control the way the resource is closed. The default value is MQC.MQCO_NONE. MQC.MQCO_NONE s the only permissible value for all resources other than permanent dynamic queues, temporary dynamic queues, subscriptions, and topics that are being accessed by the objects that created them.

    For queues and topics, the following additional values are permissible:

      MQC.MQCO_DELETE
      Delete the queue if there are no messages.

      MQC.MQCO_DELETE_PURGE
      Delete the queue, purging any messages on it.

      MQC.MQCO_QUIESCE
      Request the queue be closed, receiving a warning if any messages remain (allowing them to be retrieved before final closing).

    For subscriptions, the following additional values are permissible:

      MQC.MQCO_KEEP_SUB
      The subscription is not deleted. This option is valid only if the original subscription is durable. MQC.MQCO_KEEP_SUB is the default value for a durable topic.

      MQC.MQCO_REMOVE_SUB
      The subscription is deleted. MQC.MQCO_REMOVE_SUB is the default value for a non-durable, unmanaged topic.

      MQC.MQCO_PURGE_SUB
      The subscription is deleted. MQC.MQCO_PURGE_SUB is the default value for a non-durable, managed topic.

    public MQQueueManager ConnectionReference {get;}
    The queue manager to which this resource belongs.

    public string MQDescription {get;}
    The description of the resource as held by the queue manager. MQDescription returns an empty string for subscriptions and topics.

    public boolean IsOpen {get;}
    Indicates whether the resource is currently open.

    public string Name {get;}
    The name of the resource. The name is either the supplied on the access method, or the allocated by the queue manager for a dynamic queue.

    public int OpenOptions {get; set;}
    OpenOptions are set when an IBM MQ object is opened. The OpenOptions.set method is ignored and does not cause an error. Subscriptions have no OpenOptions.


Methods

    public virtual void Close();
    Throws MQException.
    Closes the object. No further operations against this resource are permitted after calling Close. To change the behavior of the Close method, set the closeOptions attribute.

    public string GetAttributeString(int selector, int length);
    Throws MQException.
    Gets an attribute string.

      selector
      Integer indicating which attribute is being queried.

      length
      Integer indicating the length of the string required.

    public void Inquire(int[] selectors, int[] intAttrs, byte[] charAttrs);
    Throws MQException.
    Returns an array of integers and a set of character strings containing the attributes of a queue, process, or queue manager. The attributes to be queried are specified in the selectors array. Note: Many of the more common attributes can be queried using the Get methods defined in MQManagedObject, MQQueue and MQQueueManager.

      selectors
      Integer array identifying the attributes with values to be inquired on.

      intAttrs
      The array in which the integer attribute values are returned. Integer attribute values are returned in the same order as the integer attribute selectors in the selectors array.

      charAttrs
      The buffer in which the character attributes are returned, concatenated. Character attributes are returned in the same order as the character attribute selectors in the selectors array. The length of each attribute string is fixed for each attribute.

    public void Set(int[] selectors, int[] intAttrs, byte[] charAttrs);
    Throws MQException.
    Sets the attributes defined in the vector of selectors. The attributes to be set are specified in the selectors array.

      selectors
      Integer array identifying the attributes with values to be set.

      intAttrs
      The array of integer attribute values to be set. These values must be in the same order as the integer attribute selectors in the selectors array.

      charAttrs
      The buffer in which the character attributes to be set are concatenated. These values must be in the same order as the character attribute selectors in the selectors array. The length of each character attribute is fixed.

    public void SetAttributeString(int selector, string value, int length);
    Throws MQException.
    Sets an attribute string.

      selector
      Integer indicating which attribute is being set.

      value
      The string to set as the attribute value.

      length
      Integer indicating the length of the string required.


Constructors

    protected MQManagedObject()
    Constructor method. This object is an abstract base class which cannot be instantiated by itself.

Parent topic: The IBM MQ .NET classes and interfaces