org.mactor.brokers.mqseries
Class MqSeriesMessageBroker

java.lang.Object
  extended by org.mactor.brokers.AbstractMessageBroker
      extended by org.mactor.brokers.PollingMessageBrokerTemplate
          extended by org.mactor.brokers.mqseries.MqSeriesMessageBroker
All Implemented Interfaces:
MessageBroker

public class MqSeriesMessageBroker
extends PollingMessageBrokerTemplate

A message broker for IBM MQ Series (add the com.ibm.mq.jar library from your version of MQ Series to the MActor classpath)

Author:
Lars Ivar Almli

Field Summary
 
Fields inherited from class org.mactor.brokers.PollingMessageBrokerTemplate
log
 
Constructor Summary
MqSeriesMessageBroker(MessageBrokersConfig.MessageBrokerConfig config)
           
 
Method Summary
protected  java.util.List<Message> doGetMessages(java.lang.String channel, int maxMessageCount)
          Template method called to check for incoming messages (the polling interval is defined by the message broker config)
protected  void doPublishMessage(java.lang.String channel, Message message)
          Template method called to publish a message.
 void terminate()
           
 
Methods inherited from class org.mactor.brokers.PollingMessageBrokerTemplate
onFirstSubscribe, onLastSubscribe, publish, publishWithResponse
 
Methods inherited from class org.mactor.brokers.AbstractMessageBroker
raiseOnMessage, subscribe, unsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MqSeriesMessageBroker

public MqSeriesMessageBroker(MessageBrokersConfig.MessageBrokerConfig config)
Method Detail

terminate

public void terminate()
Specified by:
terminate in interface MessageBroker
Overrides:
terminate in class PollingMessageBrokerTemplate

doGetMessages

protected java.util.List<Message> doGetMessages(java.lang.String channel,
                                                int maxMessageCount)
                                         throws MactorException
Description copied from class: PollingMessageBrokerTemplate
Template method called to check for incoming messages (the polling interval is defined by the message broker config)

Specified by:
doGetMessages in class PollingMessageBrokerTemplate
Parameters:
channel - the channel
maxMessageCount - the max number of messages to return (as defined in the message broker config).
Returns:
list of messages
Throws:
MactorException - if a problem occured (this will not cause the test to fail)

doPublishMessage

protected void doPublishMessage(java.lang.String channel,
                                Message message)
                         throws MactorException
Description copied from class: PollingMessageBrokerTemplate
Template method called to publish a message.

Specified by:
doPublishMessage in class PollingMessageBrokerTemplate
Parameters:
channel - the channel
message - the message
Throws:
MactorException - if a problem occured (this will cause the test to fail)


Copyright © 2008. All Rights Reserved.