java.lang.Object | *- com.ibm.mq.MQManagedObject |
MQManagedObject is a superclass for MQQueueManager, MQQueue and MQProcess. It provides the ability to inquire and set attributes of these resources.
The alternate user id (if any) specified when this resource was opened. Setting this attribute has no effect.
Set this attribute to control the way the resource is closed. The default value is MQC.MQCO_NONE, and this is the only permissible value for all resources other than permanent dynamic queues, and temporary dynamic queues that are being accessed by the objects that created them. For these queues, the following additional values are permissible:
The queue manager to which this resource belongs. Setting this attribute has no effect.
Indicates whether this resource is currently open. This attribute is deprecated and setting it has no effect.
The name of this resource (either the name supplied on the access method, or the name allocated by the queue manager for a dynamic queue). Setting this attribute has no effect.
The options specified when this resource was opened. Setting this attribute has no effect.
Constructor method.
public synchronized void close()
throws MQException.
Close the object. No further operations against this resource are permitted after this method has been called. The behavior of the close method may be altered by setting the closeOptions attribute.
Throws MQException if the WebSphere MQ call fails.
public String getDescription()
Throws MQException.
Return the description of this resource as held at the queue manager.
If this method is called after the resource has been closed, an MQException is thrown.
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 an object (queue, process or queue manager).
The attributes to be queried are specified in the selectors array. Refer to the WebSphere MQ Application Programming Reference for details of the permissible selectors and their corresponding integer values.
Note that many of the more common attributes can be queried using the getXXX() methods defined in MQManagedObject, MQQueue, MQQueueManager, and MQProcess.
Parameters
Throws MQException if the inquire fails.
Returns the value of the isOpen variable.
public synchronized void set(int selectors[], int intAttrs[], byte charAttrs[])
throws MQException.
Set the attributes defined in the selector's vector.
The attributes to be set are specified in the selectors array. Refer to the WebSphere MQ Application Programming Reference for details of the permissible selectors and their corresponding integer values.
Note that some queue attributes can be set using the setXXX() methods defined in MQQueue.
Parameters
Throws MQException if the set fails.