use of org.apache.activemq.apollo.broker.Broker in project fabric8 by jboss-fuse.
the class DetectingGatewayTest method createBroker.
public Broker createBroker(String hostname) {
Broker broker = new Broker();
BrokerDTO config = broker.config();
// Configure the virtual host..
VirtualHostDTO virtualHost = new VirtualHostDTO();
virtualHost.id = hostname;
virtualHost.host_names.add(hostname);
config.virtual_hosts.add(virtualHost);
// Configure the connectors
AcceptingConnectorDTO connector = new AcceptingConnectorDTO();
connector.connection_limit = 100;
connector.bind = "tcp://0.0.0.0:0";
config.connectors.clear();
config.connectors.add(connector);
return broker;
}
use of org.apache.activemq.apollo.broker.Broker in project fabric8 by jboss-fuse.
the class DetectingGatewayTest method startBrokers.
@Before
public void startBrokers() {
for (int i = 0; i < 2; i++) {
// create a broker..
String name = "broker" + i;
Broker broker = createBroker(name);
ServiceControl.start(broker);
brokers.add(broker);
// Add a service map entry for the broker.
ServiceDTO details = new ServiceDTO();
details.setId(name);
details.setVersion("1.0");
details.setContainer("testing");
details.setBundleName("none");
details.setBundleVersion("1.0");
List<String> services = Arrays.asList("stomp://localhost:" + portOfBroker(i), "mqtt://localhost:" + portOfBroker(i), "amqp://localhost:" + portOfBroker(i), "tcp://localhost:" + portOfBroker(i));
details.setServices(services);
serviceMap.serviceUpdated(name, details);
println(String.format("Broker %s is exposing: %s", name, services));
}
}
use of org.apache.activemq.apollo.broker.Broker in project fabric8 by jboss-fuse.
the class DetectingGatewayVirtualHostTest method createBroker.
public Broker createBroker(String hostname) {
Broker broker = new Broker();
BrokerDTO config = broker.config();
// Configure the virtual host..
VirtualHostDTO virtualHost = new VirtualHostDTO();
virtualHost.id = hostname;
virtualHost.host_names.add(hostname);
config.virtual_hosts.add(virtualHost);
// Configure the connectors
AcceptingConnectorDTO connector = new AcceptingConnectorDTO();
connector.connection_limit = 100;
connector.bind = "tcp://0.0.0.0:0";
config.connectors.clear();
config.connectors.add(connector);
return broker;
}
use of org.apache.activemq.apollo.broker.Broker in project fabric8 by jboss-fuse.
the class DetectingGatewayVirtualHostTest method startBrokers.
@Before
public void startBrokers() {
for (int i = 0; i < 2; i++) {
// create a broker..
String name = "broker";
Broker broker = createBroker(name);
ServiceControl.start(broker);
brokers.add(broker);
// Add a service map entry for the broker.
ServiceDTO details = new ServiceDTO();
details.setId(name + i);
details.setVersion("1.0");
details.setContainer("testing");
details.setBundleName("none");
details.setBundleVersion("1.0");
List<String> services = Arrays.asList("stomp://localhost:" + portOfBroker(i), "mqtt://localhost:" + portOfBroker(i), "amqp://localhost:" + portOfBroker(i), "tcp://localhost:" + portOfBroker(i));
details.setServices(services);
serviceMap.serviceUpdated(name, details);
println(String.format("Broker %s is exposing: %s", name, services));
}
}
use of org.apache.activemq.apollo.broker.Broker in project fabric8 by jboss-fuse.
the class ExtendedBurnIn method createBroker.
public Broker createBroker(String hostname) {
Broker broker = new Broker();
BrokerDTO config = broker.config();
// Configure the virtual host..
VirtualHostDTO virtualHost = new VirtualHostDTO();
virtualHost.id = hostname;
virtualHost.host_names.add(hostname);
config.virtual_hosts.add(virtualHost);
// Configure the connectors
AcceptingConnectorDTO connector = new AcceptingConnectorDTO();
connector.connection_limit = 100;
connector.bind = "tcp://0.0.0.0:0";
config.connectors.clear();
config.connectors.add(connector);
return broker;
}
Aggregations