1 18 package org.apache.activemq.systest.usecase.network; 19 20 import org.apache.activemq.systest.ConsumerAgent; 21 import org.apache.activemq.systest.MessageList; 22 import org.apache.activemq.systest.ProducerAgent; 23 import org.apache.activemq.systest.ScenarioSupport; 24 25 import javax.jms.Destination ; 26 27 31 public abstract class ProducerConsumerScenarioSupport extends ScenarioSupport { 32 33 protected ProducerAgent producer; 34 protected ConsumerAgent consumer; 35 protected MessageList messageList; 36 37 public ProducerConsumerScenarioSupport(ProducerAgent producer, ConsumerAgent consumer, MessageList messageList) { 38 this.consumer = consumer; 39 this.producer = producer; 40 this.messageList = messageList; 41 } 42 43 public void setDestination(Destination destination) { 44 producer.setDestination(destination); 45 consumer.setDestination(destination); 46 } 47 48 public void start() throws Exception { 49 start(messageList); 50 start(consumer); 51 start(producer); 52 } 53 } 54 | Popular Tags |