|
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.textapp.Client
The class acts as the J2SE controller for the text app client and should not be used on MIDP devices.
Once the model has been initialized and registered with the reg server, the client will prompt the user for input. If the user enters one of the keywords used to perform a function such as 'help' or 'status' then the relevant command will be performed, otherwise, the text will be sent as a message to the gateway server.
Field Summary | |
static java.lang.String |
initialPromptMessage
The first thing to be displayed to the user after initialization |
static short[] |
version
|
Constructor Summary | |
Client()
|
Method Summary | |
void |
displayHelp()
Displays the help screen to the user. |
void |
displayStatus(java.lang.String msg)
Displays a status message to the user |
protected java.lang.String |
getInput()
Obtains input from the user. |
protected AppModel |
getModel()
Returns the controller's model. |
protected AppModel |
getNewModel()
returns a new model. |
java.lang.String |
getQMname()
Returns a name for the queue manager |
protected void |
initialize()
This initializes the controller, which generally involves just initializing the model. |
static void |
main(java.lang.String[] args)
This function is invoked when this class is run from the commandline. |
void |
processInput(java.lang.String input)
This class handles user input. |
protected java.lang.String |
promptFor(java.lang.String prompt,
java.lang.String stringDefault)
Used to prompt the user for something. |
void |
run()
Called to start the controller running. |
void |
stop()
Stops the controller and all constituent parts. |
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 initialPromptMessage
Constructor Detail |
public Client()
Method Detail |
public static void main(java.lang.String[] args)
protected void initialize() throws java.lang.Exception
java.lang.Exception
protected AppModel getModel()
public void stop() throws java.lang.Exception
java.lang.Exception
public void run() throws java.lang.Exception
java.lang.Exception
public void displayHelp()
public void processInput(java.lang.String input)
input
- What the user input
protected java.lang.String getInput()
protected AppModel getNewModel()
public java.lang.String getQMname()
AppController
getQMname
in interface AppController
AppController.getQMname()
public void displayStatus(java.lang.String msg)
AppController
displayStatus
in interface AppController
msg
- The message to be displayed
AppController.displayStatus(String)
protected java.lang.String promptFor(java.lang.String prompt, java.lang.String stringDefault)
prompt
- What to prompt the user forstringDefault
- The default to display
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |