|
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.application.ExampleBase | +--examples.application.Example4
Extends ExampleBase, Application example base.
Wait for message example.
Example showing how to:
. start a queue manager . spawn a new thread which will wait for a new message and - display message if it arrives . put 2 messages to the system default queue . browse the queue to locate any remaining messages . remove any remaining messages.
The result should be that the WaitForMessage should find one message.
Field Summary | |
static short[] |
version
|
Fields inherited from class examples.application.ExampleBase |
client, example, localQMgrName, msgData, msgField, myQM, qMgrName, queueName, startupIni |
Constructor Summary | |
Example4()
Constructor that uses the default queue manager. |
|
Example4(java.lang.String queueManagerName)
Constructor that uses the queue manager passed in on the command line. |
|
Example4(java.lang.String qMgrName,
java.lang.String localQMgrIniFile)
Constructor that starts a queue manager with paramters from an ini file. |
Method Summary | |
void |
createMsgWaitThread()
Create a separate thread that will issue the WaitForMsg method against the queue manager. |
void |
doIt()
All work is performed in this method. |
static void |
main(java.lang.String[] args)
Starts the application. |
void |
run()
Thread that will sit around waiting for messages |
void |
setParms()
Over-ride default parameter settings. |
void |
stop()
|
Methods inherited from class examples.application.ExampleBase |
accessLocalQMgr, close, emptyQueue |
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
Constructor Detail |
public Example4() throws java.lang.Exception
java.lang.Exception
public Example4(java.lang.String queueManagerName) throws java.lang.Exception
queueManagerName
- java.lang.String
java.lang.Exception
public Example4(java.lang.String qMgrName, java.lang.String localQMgrIniFile) throws java.lang.Exception
qMgrName
- java.lang.String, queue manager name
The name of the queue manager to interact with.
The queue manager can be a local or a remote queue
manager.localQMgrIniFile
- java.lang.String, ini file which
contains startup parameters for the local queue
manager.
java.lang.Exception
Method Detail |
public void createMsgWaitThread()
public void doIt() throws java.lang.Exception
doIt
in class ExampleBase
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void run()
run
in interface java.lang.Runnable
public void setParms()
setParms
in class ExampleBase
public void stop()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |