Websphere MQ Everyplace

examples.install
Class DefineQueueManager

java.lang.Object
  |
  +--examples.install.SimpleCreateQM
        |
        +--examples.install.DefineQueueManager

public class DefineQueueManager
extends SimpleCreateQM

Provides a simple window interface for defining and creating a basic queue manager - illustrates use of the MQeQueueManagerConfigure class.

This class uses a GUI to interact with the user. It uses the information provided by the user to create a configuration file, and then uses the methods in the base class to create a queue manager from it.

If a Private Registry is specified, the user is asked whether they want to obtain credentials for the registry now or leave it till later. .


Field Summary
 java.lang.String defQMName
           
 java.lang.String defRegDir
           
 java.lang.String defRegSeparator
           
static short[] version
           
 
Fields inherited from class examples.install.SimpleCreateQM
defChnlAttrRuleAlias, defQueueAdapter, defQueueDir, TEXT_LABEL_DEFAULT
 
Constructor Summary
DefineQueueManager(java.lang.String qmName)
          DefineQueueManager constructor.
DefineQueueManager(java.lang.String qmName, boolean shutDownOnClose)
          Constructor which indicates whether the program should exit using System.exit() when the user closes the last window or not.
 
Method Summary
 examples.install.DefineQueueManager.defineNameFrame buildNameFrame()
          buildNameFrame - build the GUI Frame to get a Queue Manager Name and populate it.
 void buildParams()
          buildParams - build the parameters for the Queue Manager
 examples.install.DefineQueueManager.defineQMFrame buildQMFrame()
          buildQMFrame - build the GUI Frame to get the Queue Manager details and populate it.
 boolean checkQmgrName(java.lang.String name)
          Check the Queue Manager name.
 void cleanUp()
          cleanUp - clean up a definition in the event of an error.
 boolean confirmDetails()
          confirmDetails - display the details and seek confirmation.
 boolean createQMgr()
          createQMgr - create a Queue Manager definition and then create the queue manager from it.
 void displayQMFrame()
          Build and display the main Queue Manager frame.
static void main(java.lang.String[] args)
          Start the application.
 
Methods inherited from class examples.install.SimpleCreateQM
createQMgr, createQMgr, defQMRegistry, defQMRegistry
 
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

defRegDir

public java.lang.String defRegDir

defRegSeparator

public java.lang.String defRegSeparator

defQMName

public java.lang.String defQMName
Constructor Detail

DefineQueueManager

public DefineQueueManager(java.lang.String qmName)
DefineQueueManager constructor. Construct the frame to collect the user input, and show it.

Parameters:
qmName - Name of the Queue Manager to be defined; can be null

DefineQueueManager

public DefineQueueManager(java.lang.String qmName,
                          boolean shutDownOnClose)
Constructor which indicates whether the program should exit using System.exit() when the user closes the last window or not.

Parameters:
shutDownOnClose - True if the program should terminate when the last window is closed. False if the program should stay alive. True is used when the program is invoked from the command line, false when another windowing program causes it to launch.
qmName - The name of the queue manager to be defined. If null, then the information is gathered from the user anyway.
Method Detail

displayQMFrame

public void displayQMFrame()
Build and display the main Queue Manager frame.


buildNameFrame

public examples.install.DefineQueueManager.defineNameFrame buildNameFrame()
buildNameFrame - build the GUI Frame to get a Queue Manager Name and populate it. This uses a defineNameFrame, which is an AwtFrame extended with an Action rotine. It is defined in an inner class.

Returns:
The built frame.

buildQMFrame

public examples.install.DefineQueueManager.defineQMFrame buildQMFrame()
buildQMFrame - build the GUI Frame to get the Queue Manager details and populate it. This uses a defineQMFrame, which is an AwtFrame extended with an Action routine. It is defined in an inner class.

Returns:
The built frame.

confirmDetails

public boolean confirmDetails()
confirmDetails - display the details and seek confirmation.

Overrides:
confirmDetails in class SimpleCreateQM
Returns:
'true' if the user confirms, 'false' otherwise

createQMgr

public boolean createQMgr()
createQMgr - create a Queue Manager definition and then create the queue manager from it.

Returns:
'true' if successful or user quits, 'false' to continue after error

cleanUp

public void cleanUp()
cleanUp - clean up a definition in the event of an error.


buildParams

public void buildParams()
                 throws java.lang.Exception
buildParams - build the parameters for the Queue Manager

java.lang.Exception

checkQmgrName

public boolean checkQmgrName(java.lang.String name)
Check the Queue Manager name.

Parameters:
name - The Queue Manager name
Returns:
'true' if it is valid, else false

main

public static void main(java.lang.String[] args)
Start the application.


Websphere MQ Everyplace