Websphere MQ Everyplace

examples.config
Class BasicAdministration

java.lang.Object
  |
  +--examples.config.BasicAdministration

public class BasicAdministration
extends java.lang.Object

This class illustrates the basics of administration using admin messages.

It uses CreateQueueManager to create and start a queue manager as an entry point to MQe, and as a subject of a queue manager query.


Field Summary
static short[] version
           
 
Constructor Summary
BasicAdministration()
           
 
Method Summary
static java.lang.String decorateAdminMsg(MQeAdminMsg msg, java.lang.String targetQMName)
          This method performs standard processing that decoprates an admin message so that we can handle it in a standard way.
static boolean isSuccess(MQeAdminMsg reply)
          Reply true if the given admin reply message represents a succesful admin action.
static MQeAdminMsg waitForRemoteAdminReply(MQeQueueManager localQueueManager, java.lang.String remoteQueueManagerName, java.lang.String match)
          Wait for message - waits for a message to arrive on the admin reply queue of the specified target queue manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static short[] version
Constructor Detail

BasicAdministration

public BasicAdministration()
Method Detail

decorateAdminMsg

public static final java.lang.String decorateAdminMsg(MQeAdminMsg msg,
                                                      java.lang.String targetQMName)
                                               throws java.lang.Exception
This method performs standard processing that decoprates an admin message so that we can handle it in a standard way.

This method:

Sets the target queue manager (the queue maanger upon which the admin action takes place.

Requests that a reply message is sent to the admin reply queue on the target queue manager.

Incorporates a unique key in the message that can be used to retrieve the reply for this message. The unique key is returned as a string, to be used by the routine extracting the reply.

java.lang.Exception

waitForRemoteAdminReply

public static final MQeAdminMsg waitForRemoteAdminReply(MQeQueueManager localQueueManager,
                                                        java.lang.String remoteQueueManagerName,
                                                        java.lang.String match)
                                                 throws java.lang.Exception
Wait for message - waits for a message to arrive on the admin reply queue of the specified target queue manager. Will wait only for messages with the specified unique tag return message, or null if timed out

java.lang.Exception

isSuccess

public static final boolean isSuccess(MQeAdminMsg reply)
                               throws java.lang.Exception
Reply true if the given admin reply message represents a succesful admin action. Return false otherwise. A message indicating success or failure will be printed to the console. If the admin action was not successful then the reason will be printed to the console

java.lang.Exception

Websphere MQ Everyplace