Websphere MQ Everyplace

examples.midp.exampleapp.textapp
Class AppModelGatewayServer

java.lang.Object
  |
  +--examples.midp.exampleapp.textapp.AppModel
        |
        +--examples.midp.exampleapp.textapp.AppModelServer
              |
              +--examples.midp.exampleapp.textapp.AppModelGatewayServer
All Implemented Interfaces:
MessageConsumer, java.lang.Runnable

public class AppModelGatewayServer
extends AppModelServer

The gateway server acts as a simple server within the system. In a real life situation, it would likely act as a gateway to an MQ system (hence the name), allowing commnuication between MQ and MQe queue managers.

Any messages received are displayed (it isn't expecting anything other than messages from MQe clients).


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
AppModelGatewayServer()
           
 
Method Summary
protected  void initializeOtherQueues()
          This creates all less common queues that a queue manager may need ( home server queues, store and forward queues etc).
 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.
 
Methods inherited from class examples.midp.exampleapp.textapp.AppModelServer
getListenerPort, initialConfiguration, isServer, processDataGramMsg, processMessage
 
Methods inherited from class examples.midp.exampleapp.textapp.AppModel
chooseConnections, chooseLocalQueues, chooseRemoteQueues, 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

version

public static short[] version
Constructor Detail

AppModelGatewayServer

public AppModelGatewayServer()
Method Detail

initializeOtherQueues

protected void initializeOtherQueues()
                              throws java.lang.Exception
Description copied from class: AppModel
This creates all less common queues that a queue manager may need ( home server queues, store and forward queues etc).

Specified by:
initializeOtherQueues in class AppModel
Returns:
void
java.lang.Exception
See Also:
AppModel.initializeOtherQueues()

processReplyMsg

public void processReplyMsg(MQeMsgObject message,
                            java.lang.String qMgrName,
                            java.lang.String qName)
Description copied from interface: MessageConsumer
A reply message has been received.

Parameters:
message - The message to display
qMgrName - The queue manager the message is on
qName - The queue the message is on
Returns:
void
See Also:
MessageConsumer.processReplyMsg(MQeMsgObject, String, String)

processRequestMsg

public void processRequestMsg(MQeMsgObject message,
                              java.lang.String qMgrName,
                              java.lang.String qName)
Description copied from interface: MessageConsumer
A new request message has been received. Note, the message still exists on the queue, it has been browsed so will stay on the queue until a get or delete operation.

Parameters:
message - The message to display.
qMgrName - The queue manager the message is on
qName - The queue the message is on
Returns:
void
See Also:
MessageConsumer.processRequestMsg(MQeMsgObject, String, String)

Websphere MQ Everyplace