Websphere MQ Everyplace

examples.midp.exampleapp.textapp
Class GatewayServer

java.lang.Object
  |
  +--examples.midp.exampleapp.textapp.Client
        |
        +--examples.midp.exampleapp.textapp.GatewayServer
All Implemented Interfaces:
AppController

public class GatewayServer
extends Client

This class acts as the controller for the gateway server.

Very little is required for the gateway server as it is a simple 'if you reveive a message, display it' design. Dealing with user input is the main part of the code. This is done in processInput().


Field Summary
static short[] version
           
 
Fields inherited from class examples.midp.exampleapp.textapp.Client
initialPromptMessage
 
Constructor Summary
GatewayServer()
           
 
Method Summary
 void displayHelp()
          Displays the help screen to the user.
protected  AppModel getNewModel()
          returns a new model.
 java.lang.String getQMname()
          Returns a name for the queue manager
static void main(java.lang.String[] args)
          Used to run the controller from the commandline.
 void processInput(java.lang.String input)
          Available commands are 'help', 'status' and 'quit'.
 
Methods inherited from class examples.midp.exampleapp.textapp.Client
displayStatus, getInput, getModel, initialize, promptFor, run, stop
 
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
Constructor Detail

GatewayServer

public GatewayServer()
Method Detail

main

public static void main(java.lang.String[] args)
Used to run the controller from the commandline.

Returns:
void

getNewModel

protected AppModel getNewModel()
Description copied from class: Client
returns a new model. This is used so that classes that extend this class can simply override this function rather than getModel().

Overrides:
getNewModel in class Client
Returns:
AppModel
See Also:
Client.getNewModel()

getQMname

public java.lang.String getQMname()
Description copied from interface: AppController
Returns a name for the queue manager

Specified by:
getQMname in interface AppController
Overrides:
getQMname in class Client
See Also:
Client.getQMname()

processInput

public void processInput(java.lang.String input)
Available commands are 'help', 'status' and 'quit'.

Overrides:
processInput in class Client
Parameters:
input - What the user input
Returns:
void
See Also:
Client.processInput(String)

displayHelp

public void displayHelp()
Description copied from class: Client
Displays the help screen to the user.

Overrides:
displayHelp in class Client
Returns:
void
See Also:
Client.displayHelp()

Websphere MQ Everyplace