|
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.AppModel | +--examples.midp.exampleapp.textapp.AppModelServer
A simple layout for a server that the registration server and gateway can extend. This class is abstract as it should not be used as a server model, since it does not implement some abstract classes that are required and will differ between servers.
In general, a server will need to specify its listener port and define what to do when it gets a message as well as how to display it.
The defaults for this are provided within this class, though they may be overridden by classes that extend it. e.g. the registration server listens on port 8083 not the default 8082 to allow it to be present on the same computer as the gateway server.
Field Summary | |
static short[] |
version
|
Fields inherited from class examples.midp.exampleapp.textapp.AppModel |
DEFAULT_CLIENT_QM, DEFAULT_GATEWAY, DEFAULT_GATEWAY_QM, DEFAULT_HOMESERVER_Q, DEFAULT_LISTENER_PORT, DEFAULT_REGISTRATION, DEFAULT_REGISTRATION_LISTENER_PORT, DEFAULT_REGISTRATION_Q, DEFAULT_REGISTRATION_QM, DEFAULT_REGISTRATION_REPLY_Q, DEFAULT_REPLY_Q, DEFAULT_REQUEST_Q, DEFAULT_RULES, GatewayCommand, GatewayOptions, RegistrationCommand, RegistrationOptions |
Constructor Summary | |
AppModelServer()
|
Method Summary | |
protected int |
getListenerPort()
Returns the port that the queue manager listens on. |
protected void |
initialConfiguration()
Configures the model - servers need a listener. |
protected boolean |
isServer()
Used to check whether the model is a client or server. |
void |
processDataGramMsg(MQeMsgObject message,
java.lang.String qMgrName,
java.lang.String qName)
If a datagram is received, simply display it. |
void |
processMessage(MQeMsgObject message)
Formats an MQe or MQ message before displaying it. |
Methods inherited from class examples.midp.exampleapp.textapp.AppModel |
chooseConnections, chooseLocalQueues, chooseRemoteQueues, clearLocalQueues, createListener, getController, getLocalQMname, getMsgService, initializeConnections, initializeLocalQueues, initializeOtherQueues, initializeRemoteQueues, monitorLocalQueues, processStatus, registerWithCentral, run, sendNewMessage, setLocalQMname, setMsgService, start, statusReport, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface examples.midp.exampleapp.messageservice.MessageConsumer |
processReplyMsg, processRequestMsg |
Field Detail |
public static short[] version
Constructor Detail |
public AppModelServer()
Method Detail |
protected boolean isServer()
AppModel
This design has problem with expandability if, in the future, a server that registers with the central server is required.
isServer
in class AppModel
AppModel.isServer()
public void processDataGramMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
message
- The message to displayqMgrName
- The queue manager the message is onqName
- The queue the message is on
MessageConsumer.processDataGramMsg(MQeMsgObject, String, String)
protected void initialConfiguration() throws java.lang.Exception
initialConfiguration
in class AppModel
java.lang.Exception
AppModel.initialConfiguration()
public void processMessage(MQeMsgObject message)
message
- The message to display
protected int getListenerPort()
AppModel
getListenerPort
in class AppModel
AppModel.getListenerPort()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |