MQManagedObject
java.lang.Object | *- com.ibm.mq.MQManagedObject
public class MQManagedObject
extends Object
MQManagedObject is a superclass for MQQueueManager, MQQueue, and MQProcess. It provides the ability to inquire and set attributes of these resources.
Variables
- alternateUserId
- public String alternateUserId
The alternate user ID (if any) specified when this resource was opened. Setting this attribute has no effect.
- closeOptions
- public int closeOptions
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:
- MQC.MQCO_DELETE
- Delete the queue if there are no messages.
- MQC.MQCO_DELETE_PURGE
- Delete the queue, purging any messages on it.
- connectionReference
- public MQQueueManager connectionReference
The queue manager to which this resource belongs. Setting this attribute has no effect.
- isOpen
- public boolean isOpen
Indicates whether this resource is currently open. This attribute is deprecated and setting it has no effect.
- name
- public String name
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.
- openOptions
- public int openOptions
The options specified when this resource was opened. Setting this attribute has no effect.
Constructors
- MQManagedObject
- protected MQManagedObject()
Constructor method.
Methods
- close
public synchronized void close()Throws MQException.
Closes the object. No further operations against this resource are permitted after this method has been called. To change the behavior of the close method, set the closeOptions attribute.
Throws MQException if the WebSphere MQ call fails.
- getDescription
public String getDescription()Throws MQException.
Returns 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.
- inquire
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.
Many of the more common attributes can be queried using the getXXX() methods defined in MQManagedObject, MQQueue, MQQueueManager, and MQProcess.
Parameters
- 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.
Throws MQException if the inquire fails.
- isOpen
- public boolean isOpen()
Returns the value of the isOpen variable.
- set
public synchronized void set(int selectors[], int intAttrs[], byte charAttrs[])Throws MQException.
Sets 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.
Some queue attributes can be set using the setXXX() methods defined in MQQueue.
Parameters
- 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.
Throws MQException if the set fails.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.