|
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.AppModelClient
The aim of the client model is to register with the registration server and be prepared to send messages to the gateway server. Unlike the message pump, messages will only be sent by the request of the user.
To achieve these goals, remote queues to the gateway and registration reply and request queues are required as well as a connection to both those servers.
Since everything is driven by user input, almost all the work is done by the client controller. The model mainly sets the queue manager up correctly to allow it to perform its functions.
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 | |
AppModelClient()
|
Method Summary | |
protected java.lang.String[] |
chooseConnections()
Need connections to the reg and gateway servers. |
protected java.lang.String[] |
chooseRemoteQueues()
We require the ability to send to the request queue of the gateway server and to request a registration (and check the reply) from the reg server. |
protected int |
getListenerPort()
(client shouldn't have a listener but returns something anyway). |
protected void |
initialConfiguration()
Configures the model - clients need to register with the central server. |
protected void |
initializeOtherQueues()
A home server queue on the gateway is used by the client. |
protected boolean |
isServer()
This is not a server. |
void |
processDataGramMsg(MQeMsgObject message,
java.lang.String qMgrName,
java.lang.String qName)
A datagram message has been received. |
void |
processReplyMsg(MQeMsgObject message,
java.lang.String qMgrName,
java.lang.String qName)
A reply message has been received. |
void |
processRequestMsg(MQeMsgObject message,
java.lang.String qMgrName,
java.lang.String qName)
A new request message has been received. |
protected void |
setProperty(java.lang.String property,
java.lang.String value)
Sets a property of the model. |
Methods inherited from class examples.midp.exampleapp.textapp.AppModel |
chooseLocalQueues, clearLocalQueues, createListener, getController, getLocalQMname, getMsgService, initializeConnections, initializeLocalQueues, 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 |
Field Detail |
public static short[] version
Constructor Detail |
public AppModelClient()
Method Detail |
protected boolean isServer()
isServer
in class AppModel
AppModel.isServer()
protected void setProperty(java.lang.String property, java.lang.String value)
protected void initializeOtherQueues() throws java.lang.Exception
initializeOtherQueues
in class AppModel
java.lang.Exception
AppModel.initializeOtherQueues()
protected void initialConfiguration() throws java.lang.Exception
initialConfiguration
in class AppModel
java.lang.Exception
AppModel.initialConfiguration()
protected java.lang.String[] chooseRemoteQueues()
chooseRemoteQueues
in class AppModel
AppModel.chooseRemoteQueues()
protected java.lang.String[] chooseConnections()
chooseConnections
in class AppModel
AppModel.chooseConnections()
public void processDataGramMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
MessageConsumer
message
- The message to displayqMgrName
- The queue manager the message is onqName
- The queue the message is on
MessageConsumer.processDataGramMsg(MQeMsgObject, String, String)
public void processReplyMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
MessageConsumer
message
- The message to displayqMgrName
- The queue manager the message is onqName
- The queue the message is on
MessageConsumer.processReplyMsg(MQeMsgObject, String, String)
public void processRequestMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
MessageConsumer
message
- The message to display.qMgrName
- The queue manager the message is onqName
- The queue the message is on
MessageConsumer.processRequestMsg(MQeMsgObject, String, String)
protected int getListenerPort()
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 |