Websphere MQ Everyplace

com.ibm.mqe.administration
Class MQeQueueAdminMsg

java.lang.Object
  |
  +--com.ibm.mqe.MQe
        |
        +--com.ibm.mqe.MQeFields
              |
              +--com.ibm.mqe.MQeMsgObject
                    |
                    +--com.ibm.mqe.MQeAdminMsg
                          |
                          +--com.ibm.mqe.administration.MQeQueueAdminMsg
All Implemented Interfaces:
MQeExceptionCodes
Direct Known Subclasses:
MQeAdminQueueAdminMsg, MQeRemoteQueueAdminMsg

public class MQeQueueAdminMsg
extends MQeAdminMsg

This class is used to manage Websphere MQ Everyplace local queues.

The class extends MQeAdminMsg and provides the implementation for managing local queues.For information on basic administration concepts see MQeAdminMsg

The following actions are applicable on queues:

Queues are objects that hold messages, the messages are held in a message store owned by the queue. Typically, this message store would be a persistent storage device, such as a hard disk. However, other types of store can be used, such as a database. WebSphere MQ Everyplace relies on the fact that the queues have persistent store to be able to offer it’s assured message delivery, and so the use of any non-persistent storage, would invalidate the assured message delivery mechanism.

Local queues, as the name suggest are local to the owning queue manager.

The name of a queue is formed from the target queue manager name (for a local queue this is the name of the queue manager that owns the queue) and a unique name for the queue on that queue manager. Two fields in the administration message are used to uniquely identify the queue, these are the ascii fields MQeAdminMsg.Admin_Name and Queue_QMgrName. Method setName(String, String) can be used set these two fields in the administration message.

The queue uses a queue store adapter to handle its communications with the storage device. Adapters are interfaces between WebSphere MQ Everyplace and hardware devices, such as disks or networks, or to software, such as databases. Adapters are designed to be pluggable components, allowing the queue store to be easily changed.

All types of queue other than those that are remote and synchronous require a message store to store their messages. Each queue can specify what type of store to use, and where it is located. The queue characteristic Queue_FileDesc is used to specify the type of message store and to provide parameters for it. The file descriptor takes the form:

For example: MsgLog:d:\QueueManager\ServerQM12\Queues

A number of storage adapters are provided and include:

Please note that an alias can not be used to represent both the Message Store Class and the Adapter Class.

The choice of adapter determines the persistence and resilience of messages. For instance if a memory adapter is used then the messages are only as resilient as the memory. Memory may be a much faster medium than disk but is highly volatile compared to disk. Hence the choice of adapter is an important one.

If a message store is not defined when creating a queue, the default is to use the message store that was specified when the queue manager was created.

A queue has many other characteristics, these include:

Multiple names or aliases can be assigned to a queue. When an application calls methods on a queue manager that require a queue name, the name may be an alias or the real queue name.

Some administration actions can only be performed when the queue is in a certain state, for instance:

This class acts as the base class for managing other types of queues. For instance, MQeRemoteQueueAdminMsg derives from this class and handles management of remote queues.

The maximum message size, and maximum queue depths checks are only in place on a queue when there is no Queue Rule in place. Also for Synchronous Remote Queues, the Queue Depth check is not applied locally. The maximum message size check will however be made locally.

For an example of how to use this class, Example3

examples.administration.simple

All other queue classes inherit from this class but not all of the properties inherited are suitable for actions on each queue class. The following table and the equivalent tables in the queue subclasses are intended to show which properties are relevant for administrative actions on each type of queue.

Properties of the Queue resource (in addition to those inherited - see MQeAdminMsg)
Field name Actions using these fields
Queue_QMgrName Required in all admin actions to identify which queue object to act on
Queue_Active MQeAdminMsg.Action_Inquire.
Queue_Description MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_FileDesc MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create.
Queue_Cryptor MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_Authenticator MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_Compressor MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_TargetRegistry MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_AttrRule MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_Rule MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_MaxMsgSize MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_Priority MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_Expiry MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_MaxQSize MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.
Queue_CurrentSize MQeAdminMsg.Action_Inquire.
Queue_CreationDate MQeAdminMsg.Action_Inquire.
Queue_QAliasNameList MQeAdminMsg.Action_Inquire, MQeAdminMsg.Action_Create, MQeAdminMsg.Action_Update.


Field Summary
static java.lang.String Queue_Active
          String used to identify the field in the message representing the active state of the queue.
static byte Queue_Asynchronous
          Constant for operation mode of asynchronous
static java.lang.String Queue_AttrRule
          String used to identify the field in the message representing the attribute rule.
static java.lang.String Queue_Authenticator
          String used to identify the field in the message representing the authenticator.
static java.lang.String Queue_Compressor
          String used to identify the field in the message representing the compressor.
static java.lang.String Queue_CreationDate
          String used to identify the field in the message representing the date the queue was created.
static java.lang.String Queue_Cryptor
          String used to identify the field in the message representing the cryptor to use.
static java.lang.String Queue_CurrentSize
          String used to identify the field in the message representing the current number of messages on the queue.
static java.lang.String Queue_Description
          String used to identify the field in the message representing the description of the queue.
static java.lang.String Queue_Expiry
          String used to identify the field in the message representing the expiry time for messages on the queue.
static java.lang.String Queue_FileDesc
          String used to identify the field in the message representing the file descriptor.
static java.lang.String Queue_MaxMsgSize
          String used to identify the field in the message representing the maximum size of messages allowed on the queue.
static java.lang.String Queue_MaxQSize
          String used to identify the field in the message representing the maximum number of messages allowed on the queue.
static java.lang.String Queue_Mode
          String used to identify the field in the message representing the operating mode of the queue.
static int Queue_NoLimit
          Value for no limit.
static java.lang.String Queue_Priority
          String used to identify the field in the message representing the default priority for messages on the queue.
static java.lang.String Queue_QAliasNameList
          String used to identify the field in the message representing a set of aliases for the queue.
static java.lang.String Queue_QMgrName
          String used to identify the field in the message representing the name of the target queue manager for the queue.
static byte Queue_RegistryNone
          Constant for registry type of None.
static byte Queue_RegistryQMgr
          Constant for registry type of Queue Manager.
static byte Queue_RegistryQueue
          Constant for registry type of Queue.
static java.lang.String Queue_Rule
          String used to identify the field in the message representing the queue rule.
static byte Queue_Synchronous
          Constant for operation mode of synchronous
static java.lang.String Queue_TargetRegistry
          String used to identify the field in the message representing the target registry type.
 
Fields inherited from class com.ibm.mqe.MQeAdminMsg
Action_AddAlias, Action_Create, Action_Delete, Action_Inquire, Action_InquireAll, Action_RemoveAlias, Action_Start, Action_Stop, Action_Unknown, Action_Update, Admin_Action, Admin_Class, Admin_Errors, Admin_MaxAttempts, Admin_Name, Admin_Parms, Admin_RC, Admin_Reason, Admin_TargetQMgr, RC_Fail, RC_Mixed, RC_Success
 
Fields inherited from class com.ibm.mqe.MQeFields
ArraySeparator, TypeArrayElements, TypeAscii, TypeBoolean, TypeByte, TypeDouble, TypeFields, TypeFloat, TypeInt, TypeLong, TypeShort, TypeUnicode, TypeUnTyped
 
Fields inherited from class com.ibm.mqe.MQe
Admin_Queue_Name, Admin_Reply_Queue_Name, copyright, DeadLetter_Queue_Name, Event_Activate, Event_Attribute, Event_Authenticate, Event_Close, Event_Logoff, Event_Logon, Event_MiniCert_Validate, Event_Queue, Event_QueueManager, Event_UserBase, JMS_Version, MQ_Headers, MQe_Log_Audit_Failure, MQe_Log_Audit_Success, MQe_Log_Error, MQe_Log_Information, MQe_Log_Success, MQe_Log_Warning, Msg_BackoutCount, Msg_CorrelID, Msg_ExpireTime, Msg_LockID, Msg_MsgID, Msg_OriginQMgr, Msg_Priority, Msg_ReplyToQ, Msg_ReplyToQMgr, Msg_Resend, Msg_Style, Msg_Style_Datagram, Msg_Style_Reply, Msg_Style_Request, Msg_Time, Msg_WrapMsg, sccsid, System_Default_Queue_Name, version
 
Fields inherited from interface com.ibm.mqe.MQeExceptionCodes
Except_Active, Except_AdapterException, Except_AdapterMissingRemoteAddress, Except_Admin_ActionNotSupported, Except_Admin_InvalidField, Except_Admin_NotAdminMsg, Except_AdminAction, Except_Authenticate, Except_BadRequest, Except_BridgeListener, Except_Chnl_Attributes, Except_Chnl_ID, Except_Chnl_Limit, Except_Chnl_Overrun, Except_Closed, Except_Con_AdapterRequired, Except_Con_AliasAlreadyExists, Except_Con_AlreadyExists, Except_Con_InvalidName, Except_Connect_Failure, Except_ConnectonType, Except_Cryptor, Except_Data, Except_Duplicate, Except_JmxProperties, Except_Listener, Except_MessageStore, Except_MiniCertReg_ActivateFailed, Except_MiniCertReg_BadPIN, Except_MiniCertReg_NotOpen, Except_NotActive, Except_NotAllowed, Except_NotFound, Except_NotSupported, Except_PrivateReg_ActivateFailed, Except_PrivateReg_BadPIN, Except_PrivateReg_NotOpen, Except_PublicReg_ActivateFailed, Except_PublicReg_InvalidAddress, Except_PublicReg_InvalidRequest, Except_Q_Full, Except_Q_InvalidName, Except_Q_InvalidPriority, Except_Q_MsgTooLarge, Except_Q_NoMatchingMsg, Except_Q_TargetRegistryRequired, Except_QMgr_Activated, Except_QMgr_AlreadyExists, Except_QMgr_InvalidQMgrName, Except_QMgr_InvalidQName, Except_QMgr_NotActive, Except_QMgr_NotBridgeEnabled, Except_QMgr_NotConfigured, Except_QMgr_QDoesNotExist, Except_QMgr_QExists, Except_QMgr_QNotEmpty, Except_QMgr_RegistryDataVersion, Except_QMgr_UnknownQMgr, Except_QMgr_WrongQType, Except_Reg_AddFailed, Except_Reg_AlreadyExists, Except_Reg_AlreadyOpen, Except_Reg_CRTKeyDecFailed, Except_Reg_CRTKeySignFailed, Except_Reg_DeleteFailed, Except_Reg_DeleteRegistryFailed, Except_Reg_DoesNotExist, Except_Reg_InvalidSession, Except_Reg_ListFailed, Except_Reg_NotDefined, Except_Reg_NotSecure, Except_Reg_NullName, Except_Reg_OpenFailed, Except_Reg_ReadFailed, Except_Reg_RenameFailed, Except_Reg_ResetPINFailed, Except_Reg_SearchFailed, Except_Reg_UpdateFailed, Except_RemoteException, Except_Rule, Except_S_BadIntegrity, Except_S_BadSubject, Except_S_CertificateExpired, Except_S_Cipher, Except_S_InvalidAttribute, Except_S_InvalidSignature, Except_S_MiniCertNotAvailable, Except_S_MissingSection, Except_S_NoPresetKeyAvailable, Except_S_RegistryNotAvailable, Except_Stopped, Except_Syntax, Except_TimeOut, Except_Transporter, Except_TriggerTransmission, Except_Trnsport_QMgr, Except_Trnsport_Request, Except_Type, Except_UdpipAdapterStateException, Except_UdpipAdapterTimeOut, Except_UdpipAdapterUnableToConfirmSuccess, Except_UnCoded, Except_Uncontactable_DontTransmit
 
Constructor Summary
MQeQueueAdminMsg()
          Default constructor
MQeQueueAdminMsg(java.lang.String qMgrName, java.lang.String qName)
          This constructor takes the name of the queue that is to be managed and puts it into the admin msg.
 
Method Summary
 void addAlias(java.lang.String alias)
          Setup the message to add an alias to the queue.
 void changeAlias(java.lang.String alias)
          Adds an alias name to the aliases array.
 void removeAlias(java.lang.String alias)
          Setup the message to remove an alias from the queue.
 void setName(java.lang.String queueManagerName, java.lang.String queueName)
          Sets the name of the queue that the action is to be peformed against.
 
Methods inherited from class com.ibm.mqe.MQeAdminMsg
characteristics, create, delete, duplicate, getAction, getErrorFields, getFieldInError, getInputFields, getMaxAttempts, getName, getOutputFields, getRC, getReason, getTargetQMgr, inquire, inquireAll, setAction, setMaxAttempts, setName, setTargetQMgr, update
 
Methods inherited from class com.ibm.mqe.MQeMsgObject
getMsgUIDFields, getOriginQMgr, getTimeStamp, putOriginQMgr, resetMsgUIDFields, unwrapMsgObject
 
Methods inherited from class com.ibm.mqe.MQeFields
contains, copy, copy, dataType, deepCopy, delete, dump, dumpedType, dumpToString, equals, fields, getArrayLength, getArrayOfByte, getArrayOfDoubleAsLong, getArrayOfFloatAsInt, getArrayOfInt, getArrayOfLong, getArrayOfShort, getAscii, getAsciiArray, getAttribute, getBoolean, getByte, getDoubleAsLong, getFields, getFieldsArray, getFloatAsInt, getInt, getIntArray, getLong, getLongArray, getObject, getShort, getShortArray, getUnicode, getUnicodeArray, includes, isEqualTo, putArrayLength, putArrayOfByte, putArrayOfDoubleAsLong, putArrayOfFloatAsInt, putArrayOfInt, putArrayOfLong, putArrayOfShort, putAscii, putAsciiArray, putBoolean, putByte, putByteArray, putDoubleAsLong, putFields, putFieldsArray, putFloatAsInt, putInt, putIntArray, putLong, putLongArray, putObject, putShort, putShortArray, putUnicode, putUnicodeArray, rename, restore, restoreFromString, restoreFromString, restoreFromString, setAttribute, updateValue
 
Methods inherited from class com.ibm.mqe.MQe
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Queue_QMgrName

public static final java.lang.String Queue_QMgrName
String used to identify the field in the message representing the name of the target queue manager for the queue.

The name of a queue is formed from the target queue manager name (for a local queue this is the name of the queue manager that owns the queue) and a unique name for the queue on that queue manager. Two fields in the administration message are used to uniquely identify the queue, these are the ascii fields MQeAdminMsg.Admin_Name and Queue_QMgrName. Method setName(String, String) can be used set these two fields in the administration message.

Once set the queue manager name cannot be changed.

The field is of type ascii.

See Also:
MQeAdminMsg.Admin_Name, Constant Field Values

Queue_Active

public static final java.lang.String Queue_Active
String used to identify the field in the message representing the active state of the queue.

Field is read only so only Inquire actions are valid.

The field is of type boolean.

See Also:
Constant Field Values

Queue_Description

public static final java.lang.String Queue_Description
String used to identify the field in the message representing the description of the queue.

The field is of type unicode

See Also:
Constant Field Values

Queue_FileDesc

public static final java.lang.String Queue_FileDesc
String used to identify the field in the message representing the file descriptor.

All types of queue other than those that are remote and synchronous require a message store to store their messages. The file descriptor characteristic is used to specify the type of message store and to provide parameters for it. The file descriptor takes the form:

A number of storage adapters are provided and include:

For example, if alias MsgLog is set to com.ibm.mqe.adapters.MQeDiskFieldsAdapater then to store messages in directory d:\ServerQM123\Queues, the file descriptor would be: MsgLog:d:\ServerQM123\Queues

If a message store is not defined when creating a queue, the default value that was specified when the queue manager was created is used.

The parameters for the adapter are platform dependant. When setting the file descriptor:

The field is of type ascii.

See Also:
Constant Field Values

Queue_Cryptor

public static final java.lang.String Queue_Cryptor
String used to identify the field in the message representing the cryptor to use.

Messages held on a queue can be protected by an authenticator and cryptor. The messages can also be compressed by using a compressor. The fields relating to security characteristics are:

These fields form the basis of WebSphere MQ Everyplace queue based security. As well as securing any messages on the queue, messages that are moved over a network will be secured with the level of security specified on the queue.

This field holds the class name or alias of the cryptor to use. See package com.ibm.mqe.attributes for details on cryptors.

The cryptor can only be updated when the queue depth is 0.

The field is of type ascii.

See Also:
com.ibm.mqe.attributes, Constant Field Values

Queue_Authenticator

public static final java.lang.String Queue_Authenticator
String used to identify the field in the message representing the authenticator.

This field holds the class name or alias of the authenticator to use. One of the supplied autehenticators or a user writen authenticator can be used.

This is one of a number of security related fields, see Queue_Cryptor for more details.

This field can only be updated when the queue depth is 0.

The field is of type ascii.

See Also:
Queue_Cryptor, Constant Field Values

Queue_Compressor

public static final java.lang.String Queue_Compressor
String used to identify the field in the message representing the compressor.

This field holds the class name or alias of the compressor to use. See package com.ibm.mqe.attributes for details on cryptors.

This is one of a number of security related fields, see Queue_Cryptor for more details.

This field can only be updated when the queue depth is 0.

The field is of type ascii.

See Also:
Queue_Cryptor, com.ibm.mqe.attributes, Constant Field Values

Queue_TargetRegistry

public static final java.lang.String Queue_TargetRegistry
String used to identify the field in the message representing the target registry type.

Possible values are:

Values other than None are only relevant when the authentictor MQeWTLSCertAuthenticator is used. When this autheticator is used, it can use either the queue managers certificate (Queue_RegistryQMgr) or the queues certificate (Queue_RegistryQueue) for authentication purposes.

This is one of a number of security related fields, see Queue_Cryptor for more details.

This field can only be updated when the queue depth is 0.

The field is of type byte

See Also:
Queue_Cryptor, Constant Field Values

Queue_RegistryNone

public static final byte Queue_RegistryNone

Constant for registry type of None.

See Also:
Queue_TargetRegistry, Constant Field Values

Queue_RegistryQMgr

public static final byte Queue_RegistryQMgr

Constant for registry type of Queue Manager.

See Also:
Queue_TargetRegistry, Constant Field Values

Queue_RegistryQueue

public static final byte Queue_RegistryQueue

Constant for registry type of Queue.

See Also:
Queue_TargetRegistry, Constant Field Values

Queue_AttrRule

public static final java.lang.String Queue_AttrRule
String used to identify the field in the message representing the attribute rule.

This field holds the class name or alias of an attribute rule. The rule is used to determine if a remote request coming in over a channel is acceptable to the queue. For example see class MQeAttributeRule. If no rule has been specified and other security fields have been set, then the default is taken from the queue managers channel attribute rule. This can be set with administration message MQeQueueManagerAdminMsg and field MQeQueueManagerAdminMsg.QMgr_ChnlAttrRules.

This is one of a number of security related fields, see Queue_Cryptor for more details.

This field can only be updated when the queue depth is 0.

The field is of type ascii.

See Also:
Queue_Cryptor, MQeAttributeRule, Constant Field Values

Queue_Rule

public static final java.lang.String Queue_Rule
String used to identify the field in the message representing the queue rule.

This field holds the class name or alias of a queue rule. The behaviour of the queue can be customised by a set rules. These rules take the form of a user replaceable Java class. The base set of queue rules are defined in class, MQeQueueRule. During the operation of the queue, the rules are called when certain events occur, for example, when a message is put, a message expires, or a duplicate message arrives. The rules then determine how the queue handles these events.

The field is of type ascii.

See Also:
MQeQueueRule, Constant Field Values

Queue_MaxMsgSize

public static final java.lang.String Queue_MaxMsgSize
String used to identify the field in the message representing the maximum size of messages allowed on the queue.

This field allows the maximum size of a message allowed on the queue to be specified. Messages greater than the maximum allowed are rejected. The size of the message is determined by using the length of the byte arry which is the result of calling the MQeFields.dump() method on the message.

By default no maximum is set. The constant Queue_NoLimit can be used to specify a value of no maximum size.

The field is of type int.

See Also:
Constant Field Values

Queue_Priority

public static final java.lang.String Queue_Priority
String used to identify the field in the message representing the default priority for messages on the queue.

This field allows the default priority for messages put to the queue to be specified. If a message arrives with no priortiy set then it will take the queue's priority for the length of time that the message is on the queue. The minumum priority is 0, the maximum 9.

The field is of type byte.

See Also:
Constant Field Values

Queue_Mode

public static final java.lang.String Queue_Mode
String used to identify the field in the message representing the operating mode of the queue.

Queues can run in one of two modes synchronous or asynchrouns. Synchronous messaging provides a transmission service directly from the source application to the target queue, without queuing at the source queue manager. Asynchronous messaging is a transmission service from the source queue manager to the target queue, with queuing at the source queue manager.

Possible values for the field are:

This field has no meaning for local queues, so is only applicable to subclasses of MQeQueue like MQeRemoteQueue.

Once set the field cannot be changed.

The field is of type byte.

See Also:
Constant Field Values

Queue_Asynchronous

public static final byte Queue_Asynchronous

Constant for operation mode of asynchronous

See Also:
Queue_Mode, Constant Field Values

Queue_Synchronous

public static final byte Queue_Synchronous

Constant for operation mode of synchronous

See Also:
Queue_Mode, Constant Field Values

Queue_Expiry

public static final java.lang.String Queue_Expiry
String used to identify the field in the message representing the expiry time for messages on the queue.

This field defines the maximum time that a message remains on a queue before it expires. The value is specified in milliseconds. If the message has an expiry time then the message's expiry time is used as opposed to the queue's expiry time.

A value less than or equal to zero means the queue has no expiry time.

The default is, the queue has no expiry time.

The field is of type long.

See Also:
Constant Field Values

Queue_MaxQSize

public static final java.lang.String Queue_MaxQSize
String used to identify the field in the message representing the maximum number of messages allowed on the queue.

This field allows the maximum number of messages allowed on the queue to be specified. Once the maximum is reached, messages are rejected until the depth falls below the maximum.

By default no maximum is set. The constant Queue_NoLimit can be used to specify a value of no maximum depth.

The field is of type int.

See Also:
Constant Field Values

Queue_NoLimit

public static final int Queue_NoLimit
Value for no limit.

See Also:
Queue_MaxMsgSize, Queue_MaxQSize, Constant Field Values

Queue_CurrentSize

public static final java.lang.String Queue_CurrentSize
String used to identify the field in the message representing the current number of messages on the queue.

Field is read only so only Inquire actions are valid.

The field is of type int.

See Also:
Constant Field Values

Queue_CreationDate

public static final java.lang.String Queue_CreationDate
String used to identify the field in the message representing the date the queue was created.

The value is based on the time since midnight GMT on Jan 1, 1970 GMT

Field is read only so only Inquire actions are valid.

The field is of type long.

See Also:
Constant Field Values

Queue_QAliasNameList

public static final java.lang.String Queue_QAliasNameList
String used to identify the field in the message representing a set of aliases for the queue.

Multiple names or aliases can be assigned to a queue. This field holds the set of aliases.

The field is of type ascii array

See Also:
Constant Field Values
Constructor Detail

MQeQueueAdminMsg

public MQeQueueAdminMsg()
                 throws java.lang.Exception

Default constructor

Throws:
java.lang.Exception

MQeQueueAdminMsg

public MQeQueueAdminMsg(java.lang.String qMgrName,
                        java.lang.String qName)
                 throws java.lang.Exception
This constructor takes the name of the queue that is to be managed and puts it into the admin msg.

This constructor uses the setName(String,String) method to put the name into the administratoin message parameters field

Parameters:
qMgrName - name of the target queue manager
qName - name of the Queue
Throws:
java.lang.Exception
See Also:
setName(String, String)
Example:
 try {
     MQeQueueAdminMsg aMsg = new MQeQueueAdminMsg("ExampleQM", "ExampleQ");
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 
Method Detail

addAlias

public void addAlias(java.lang.String alias)
              throws java.lang.Exception
Setup the message to add an alias to the queue.

A method that assists in setting up an administration message to add one or more aliases to a queue. Multiple aliases can be added in one message by calling the method multiple times. The message is set to perform action MQeAdminMsg.Action_AddAlias.

The following basic fields are set:

The following fields are set in the Admin_Parms field.

The name of the queue to add an alias to is specified using method setName(String, String) or using the constructor that takes the resource name or by setting the MQeAdminMsg.Admin_Name and Queue_QMgrName fields

Parameters:
alias - the alias to add to the queue.
Throws:
java.lang.Exception
See Also:
MQeAdminMsg.Action_AddAlias, Queue_QAliasNameList
Example:
 //Add aliases to a queue
 MQeQueueAdminMsg msg = new MQeQueueAdminMsg();
 
 msg.setName("ExampleQM", "ExampleQ");
 
 //Set the action required and its parameters into the message
 msg.addAlias("PayrollQ");
 msg.addAlias("Branch1PayrollQ");
 
 

changeAlias

public void changeAlias(java.lang.String alias)
                 throws java.lang.Exception

Adds an alias name to the aliases array.

Parameters:
alias - alias name of queue
Throws:
java.lang.Exception

removeAlias

public void removeAlias(java.lang.String alias)
                 throws java.lang.Exception
Setup the message to remove an alias from the queue.

A method that assists in setting up an administration message to remove one or more aliases to a queue. Multiple aliases can be removed in one message by calling the method multiple times. The message is set to perform action MQeAdminMsg.Action_RemoveAlias.

The following basic fields are set:

The following fields are set in the Admin_Parms field.

The name of the queue to remove an alias from is specified using method setName(String, String) or using the constructor that takes the resource name or by setting the MQeAdminMsg.Admin_Name and Queue_QMgrName fields

Parameters:
alias - the alias to remove from the queue.
Throws:
java.lang.Exception
See Also:
MQeAdminMsg.Action_RemoveAlias, Queue_QAliasNameList
Example:
 // Add aliases to a queue
 MQeQueueAdminMsg msg = new MQeQueueAdminMsg();
 
 msg.setName("ExampleQM", "ExampleQ");
 
 //Set the action required and its parameters into the message
 msg.removeAlias("PayrollQ");
 msg.removeAlias("Branch1PayrollQ");
 
 

setName

public void setName(java.lang.String queueManagerName,
                    java.lang.String queueName)
             throws java.lang.Exception

Sets the name of the queue that the action is to be peformed against.

The following fields are set into the Admin_Parms field

Parameters:
queueName - name of the queue
Throws:
java.lang.Exception
Example:
 // Delete a queue
 MQeFields parms = new MQeFields();
 MQeQueueAdminMsg msg = new MQeQueueAdminMsg();
 
 //Set the action required and its parameters into the message
 msg.delete(parms);
 msg.setName("ExampleQM", "ExampleQ");
 
 

Websphere MQ Everyplace