use of org.apache.activemq.command.DiscoveryEvent in project activemq-artemis by apache.
the class DiscoveryEventTest method createObject.
@Override
public Object createObject() throws Exception {
DiscoveryEvent info = new DiscoveryEvent();
populateObject(info);
return info;
}
use of org.apache.activemq.command.DiscoveryEvent in project activemq-artemis by apache.
the class DiscoveryTransportNoBrokerTest method testAddRemoveDiscoveredBroker.
public void testAddRemoveDiscoveredBroker() throws Exception {
final URI uri = new URI("discovery:(multicast://default)?initialReconnectDelay=100&connectionTimeout=3000");
CompositeData compositeData = URISupport.parseComposite(uri);
StubCompositeTransport compositeTransport = new StubCompositeTransport();
DiscoveryTransport discoveryTransport = DiscoveryTransportFactory.createTransport(compositeTransport, compositeData, compositeData.getParameters());
final String serviceName = "tcp://localhost:61616";
discoveryTransport.onServiceAdd(new DiscoveryEvent(serviceName));
assertEquals("expected added URI after discovery event", 1, compositeTransport.getTransportURIs().length);
discoveryTransport.onServiceRemove(new DiscoveryEvent(serviceName));
assertEquals("expected URI removed after discovery event", 0, compositeTransport.getTransportURIs().length);
}
use of org.apache.activemq.command.DiscoveryEvent in project activemq-artemis by apache.
the class DiscoveryEventTest method populateObject.
@Override
protected void populateObject(Object object) throws Exception {
super.populateObject(object);
DiscoveryEvent info = (DiscoveryEvent) object;
info.setServiceName("ServiceName:1");
info.setBrokerName("BrokerName:2");
}
use of org.apache.activemq.command.DiscoveryEvent in project activemq-artemis by apache.
the class DiscoveryEventTest method createObject.
@Override
public Object createObject() throws Exception {
DiscoveryEvent info = new DiscoveryEvent();
populateObject(info);
return info;
}
use of org.apache.activemq.command.DiscoveryEvent in project activemq-artemis by apache.
the class DiscoveryEventTest method populateObject.
@Override
protected void populateObject(Object object) throws Exception {
super.populateObject(object);
DiscoveryEvent info = (DiscoveryEvent) object;
info.setServiceName("ServiceName:1");
info.setBrokerName("BrokerName:2");
}
Aggregations