|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.midp.exampleapp.msgpump.NormalClient
This class acts as the message pump controller for clients on the J2SE java platform. It contains a main() function and so can be run from the commandline.
The main uses of the controller are to get a name for the queue manager and control the pump to suit the user's requests.
An input thread is used to collect user input. This is handled by an InputThread.
The following commandline arguements are accepted:
--security [0 - 2] : Allows you to set the security level of the server.
0 = no security.
1 = message based security.
2 = queue based security.
--serverip [xxx.xxx.xxx.xxx] : The ip of the server (localhost is default)
--serverport [n] : The port to send messages to (default 8082)
--servername [name] : The name of the server to send to
--serverqueuename [queue] : The name of the queue to send to
e.g. java mqeexampleapp.msgpump.NormalClient --security 1 --serverip 10.0.0.101 will send to 10.0.0.101 using message based security
Field Summary | |
static java.lang.String |
prompttext
String used to prompt the user for input. |
static java.lang.String |
starttext
Initial thing that is displayed to the user after initialization is complete. |
static short[] |
version
|
Constructor Summary | |
NormalClient()
|
Method Summary | |
protected void |
deleteDir(java.io.File path)
Equivilent to dos deltree or linux rm -r . |
void |
deleteQueueManager()
Purges the queue manager from the system. |
void |
displayMsg(java.lang.String msg)
Displays a status report or other type of message. |
MsgPumpModel |
getModel()
Returns the model being used by the controller. |
MsgPumpModel |
getMsgPump()
Gets the msgPump. |
protected InputThread |
getNewInputThread()
Returns a new inputthread. |
MsgPumpModel |
getNewModel()
Returns a new model. |
java.lang.String |
getQMname()
The QM name is generated by using the computer's hostname. |
void |
initialize()
Sets the prompt and start texts before initializing. |
static void |
main(java.lang.String[] args)
The function called when the class is run. |
void |
processInput(java.lang.String input)
Deals with user input. |
void |
processMsg(java.lang.String msg)
Processes a status or error message. |
protected void |
setPumpProperties(java.lang.String[] args)
Called when the class is started with commandline arguments. |
void |
start()
Starts the controller. |
protected void |
startInput()
Starts the input thread. |
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 starttext
public static final java.lang.String prompttext
Constructor Detail |
public NormalClient()
Method Detail |
public static void main(java.lang.String[] args)
protected void setPumpProperties(java.lang.String[] args) throws java.lang.Exception
args
- The commandline arguments
java.lang.Exception
public void deleteQueueManager()
deleteQueueManager
in interface MsgPumpController
protected void deleteDir(java.io.File path)
path
- the directory to delete
protected void startInput()
public MsgPumpModel getModel()
getModel
in interface MsgPumpController
protected InputThread getNewInputThread()
public void processMsg(java.lang.String msg)
processMsg
in interface MsgPumpController
msg
- The mesage to display
public java.lang.String getQMname()
getQMname
in interface MsgPumpController
MsgPumpController.getQMname()
public void start() throws java.lang.Exception
This involves starting the model in a new thread.
start
in interface MsgPumpController
java.lang.Exception
public void initialize() throws java.lang.Exception
initialize
in interface MsgPumpController
java.lang.Exception
MsgPumpController.initialize()
public void processInput(java.lang.String input)
input
- The user input
public void displayMsg(java.lang.String msg)
MsgPumpController
displayMsg
in interface MsgPumpController
msg
- The message to displayMsgPumpController.displayMsg(String).
public MsgPumpModel getNewModel()
public MsgPumpModel getMsgPump()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |