|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.MQe | +--examples.queuemanager.MQeQueueManagerUtils
To provide a set of helper methods for configuring and starting various MQe components.
Each component has a Process* method which accepts configuration
data via an MQeFields object and then initialises the component
To allow the configuration data to be stored persistently on disk
methods are provided to save and restore to/from an ini file.
This class extends MQe
class.
------------------------------------------------------------------------------
Example configuration data fields : [Aliases] (ascii)EventLog=examples.eventLog.LogToDiskFile (ascii)MsgLog=com.ibm.mqe.adapters.MQeDiskFieldsAdapter [ChannelManager] (int)MaxChannels=1 [Listener] (ascii)Listen=Network::80 (ascii)Network=Network: (int)TimeInterval=300 [QueueManager] (ascii)Name=ServerQMgr [Registry] (ascii)RegType=FileRegistry (ascii)Path=.\ExampleQM\Registry\ (ascii)PrivRegPIN=12345678
Field Summary | |
static java.lang.String |
Section_Alias
|
static java.lang.String |
Section_ChannelManager
|
static java.lang.String |
Section_Listener
|
static java.lang.String |
Section_MQBridge
|
static java.lang.String |
SECTION_NAME_SYSTEM_PROPERTIES
|
static java.lang.String |
Section_PreLoad
|
static java.lang.String |
Section_QueueManager
|
static short[] |
version
|
Constructor Summary | |
MQeQueueManagerUtils()
|
Method Summary | |
static MQeFields |
loadConfigFile(java.lang.String fileName)
Reads the .ini file described by the supplied string and converts the data into an MQeFields object. |
static void |
processAlias(MQeFields sections)
Process the class alias names in the configuration data. |
static void |
processListenerSections(MQeFields sections,
MQeQueueManager queueManager)
Process the section of the configuration data that relate to the listeners. |
static java.util.Hashtable |
processPreLoad(MQeFields sections)
Process the pre-load classes configuration data. |
static MQeQueueManager |
processQueueManager(MQeFields sections)
Process the QueueManager section in the configuration data. |
static MQeQueueManager |
processQueueManager(MQeFields sections,
java.util.Hashtable ght)
Process the QueueManager section in the configuration data. |
static void |
processSystemProperties(MQeFields sections)
Process the [SystemProperties] section of the configuration data. |
static void |
saveConfigFile(java.lang.String pathname,
MQeFields fields)
Save the configuration (ini) data to disk (without comments). |
static void |
sectionProcessed(java.lang.String sectionName)
Called when the initialisation routine has successfully processed a section. |
static void |
traceOff()
Turn trace off. |
static void |
traceOn()
Start trace with default title. |
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static short[] version
public static final java.lang.String Section_Alias
public static final java.lang.String Section_ChannelManager
public static final java.lang.String Section_Listener
public static final java.lang.String Section_PreLoad
public static final java.lang.String Section_QueueManager
public static final java.lang.String Section_MQBridge
public static final java.lang.String SECTION_NAME_SYSTEM_PROPERTIES
Constructor Detail |
public MQeQueueManagerUtils()
Method Detail |
public static MQeFields loadConfigFile(java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
public static void processAlias(MQeFields sections) throws java.lang.Exception
This maps one class name to another, or a nickname to a class name :
[Alias] (ascii)EventLog=..... class to use to write event logs (ascii)Network=..... Adapter class for network support (ascii)QueueManager=..... class to use for Queue manager (ascii)Registry=..... class to use for Registry functions (ascii)Trace=..... class to provide trace functions
sections
- MQeFields object
java.lang.Exception
public static java.util.Hashtable processPreLoad(MQeFields sections) throws java.lang.Exception
Process the pre-load classes configuration data.
Pre-load a class for any programs that run concurrently with the server.
[PreLoad] { Optional } pre-load classes (ascii)nnn=..... keyword (unique)=class name to load (ascii)nnn=..... keyword (unique)=class name to load .....
sections
- MQeFields object
java.lang.Exception
public static void processSystemProperties(MQeFields sections) throws java.lang.Exception
Extract each property in turn, and put them into the Java system property. Values already in the java system properties, like those specified by the -Dname=value mechanism on the command-line are over-written with the values within this section.
java.lang.Exception
public static MQeQueueManager processQueueManager(MQeFields sections, java.util.Hashtable ght) throws java.lang.Exception
Process the QueueManager section in the configuration data.
[QueueManager] parameters for the Queue Manager (ascii)Name=..... Qmanager name (ascii)Path=..... Qmanager ini file
Processing the Queue Manager also processes the Registry, AppRunList and CloseAppRunList sections.
sections
- MQeFields objectght
- HashTable.
java.lang.Exception
public static void saveConfigFile(java.lang.String pathname, MQeFields fields) throws java.lang.Exception
pathname
- String containing the filename to save asfields
- MQefields object to write.
java.lang.Exception
public static void traceOff()
public static void traceOn()
public static void sectionProcessed(java.lang.String sectionName)
sectionName
- A String containing the section name
public static void processListenerSections(MQeFields sections, MQeQueueManager queueManager) throws java.lang.Exception
Process the section of the configuration data that relate to the listeners. This code uses the old format for the ini file, but uses the new listener management code.
This method replaces MQeQueueManagerUtils.processListener() and MQeQueueManagerUtils.processChannelManager() both of which use code that is now deprecated. This method should be called after the queue manager has been created and activated. The listener(s) created using the new API will be stopped and cleaned up when the queue manager is closed. The listener only needs to be created once. Once created, the queue manager will automatically start the listener when it starts. Two sections from the ini file are processed: [ChannelManager] Parameters for the channel manager (int)MaxChannels=..... max number of concurrent channels [Listener] (ascii)Listen=..... Listener file descriptor (ascii)Network=..... Read/Write file descriptor
sections
- An MQeFields object representing the data from an ini filequeueManager
- An MQeQueueManager object
java.lang.Exception
public static MQeQueueManager processQueueManager(MQeFields sections) throws java.lang.Exception
Process the QueueManager section in the configuration data.
[QueueManager] parameters for the Queue Manager (ascii)Name=..... Qmanager name (ascii)Path=..... Qmanager ini file
Processing the Queue Manager also processes the Registry, AppRunList and CloseAppRunList sections.
sections
- An MQeFields object
java.lang.Exception
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |