1 18 package org.apache.activemq.systest.impl; 19 20 import org.apache.activemq.broker.BrokerService; 21 import org.apache.activemq.network.NetworkConnector; 22 import org.apache.activemq.systest.BrokerAgent; 23 24 29 public class DiscoveryBrokerAgentImpl extends BrokerAgentImpl { 30 31 public DiscoveryBrokerAgentImpl() throws Exception { 32 } 33 34 public void connectTo(BrokerAgent remoteBroker) throws Exception { 35 NetworkConnector connector = getBroker().addNetworkConnector("rendezvous"); 36 if (isStarted()) { 37 connector.start(); 38 } 39 } 40 41 protected BrokerService createBroker() throws Exception { 42 BrokerService answer = new BrokerService(); 43 answer.setBrokerName(getBrokerName()); 44 answer.setPersistent(isPersistent()); 45 answer.addConnector("discovery:" + getConnectionURI()); 46 return answer; 47 } 48 49 } 50 | Popular Tags |