|
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 | +--examples.midp.exampleapp.textapp.AppModelRegistrationServer
The aim of the registration server is to give an example of how a server can be used to provide resources for new clients. In this case, when a client registers with the server, it will be added to a store and forward queue on the gateway. This is a simple example of how resources can be set up for clients by another queue manager, allow greater flexibility and scalability in the design of the system.
If the registration succeeds or fails, a reply is left for the client on the registration server's reply queue informing them of the success / failure of the registration.
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 | |
AppModelRegistrationServer()
|
Method Summary | |
protected java.lang.String[] |
chooseConnections()
Return a list of connections used by the model. |
protected java.lang.String[] |
chooseLocalQueues()
Need request and reply registration queues as well as a normal reply queue. |
protected java.lang.String[] |
chooseRemoteQueues()
Return a list of remote queues used by the model. |
protected MQeMsgObject |
createRegistrationReplyMsg(java.lang.String regQMname)
Creates a reply message for a queue manager that has just been registered. |
protected void |
createResourcesForNewClientQM(java.lang.String regQMname)
Add resource definitions required for a client on the central site for instance add client as a target to a store and forward queue, add remote queue definition to big MQ |
protected int |
getListenerPort()
Returns the port that the queue manager listens on. |
protected void |
initializeOtherQueues()
Reg server has no other queues to initialize. |
protected void |
processRegistrationRequest(MQeMsgObject msg)
Called upon reveiving a new registration request from a client. |
void |
processReplyMsg(MQeMsgObject message,
java.lang.String qMgrName,
java.lang.String qName)
The registration server has no need to deal with reply messages. |
void |
processRequestMsg(MQeMsgObject msg,
java.lang.String qMgrName,
java.lang.String qName)
A new request message has been received, do something with it for instance display it. |
Methods inherited from class examples.midp.exampleapp.textapp.AppModelServer |
initialConfiguration, isServer, processDataGramMsg, processMessage |
Methods inherited from class examples.midp.exampleapp.textapp.AppModel |
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 AppModelRegistrationServer()
Method Detail |
protected java.lang.String[] chooseLocalQueues()
chooseLocalQueues
in class AppModel
AppModel.chooseLocalQueues()
protected void initializeOtherQueues() throws java.lang.Exception
Reg server has no other queues to initialize.
initializeOtherQueues
in class AppModel
java.lang.Exception
AppModel.initializeOtherQueues()
protected java.lang.String[] chooseRemoteQueues()
AppModel
chooseRemoteQueues
in class AppModel
AppModel.chooseRemoteQueues()
protected java.lang.String[] chooseConnections()
AppModel
chooseConnections
in class AppModel
AppModel.chooseConnections()
protected MQeMsgObject createRegistrationReplyMsg(java.lang.String regQMname) throws java.lang.Exception
regQMname
- The name of the queue manager that has been registered
java.lang.Exception
protected void createResourcesForNewClientQM(java.lang.String regQMname) throws java.lang.Exception
regQMname
- Name of the queue manager to be registered
java.lang.Exception
protected void processRegistrationRequest(MQeMsgObject msg) throws java.lang.Exception
msg
- The request message
java.lang.Exception
public void processRequestMsg(MQeMsgObject msg, java.lang.String qMgrName, java.lang.String qName)
Note: the message still exists on the queue, it has been browsed so will stay on the queue until a get or delete operation.
msg
- The message to display.qMgrName
- The queue manager the message is onqName
- The queue the message is on
public void processReplyMsg(MQeMsgObject message, java.lang.String qMgrName, java.lang.String qName)
message
- The message to display.qMgrName
- The queue manager the message is onqName
- The queue the message is on
protected int getListenerPort()
AppModel
getListenerPort
in class AppModelServer
AppModel.getListenerPort()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |