try { notificationTypeLock.wait(); } catch(InterruptedException e) {}
}
NewBrokerResponse nbr = new NewBrokerResponse();
if (consumerList != null || producerList != null || brokerList == null) {
nbr.setFirstBroker(true);
EndConsumers endConsumers = new EndConsumers();
if (consumerList != null) {
endConsumers.setSequenceType(Constants.EndConsumers);
for (URL consumerUrl : consumerList) {
endConsumers.addReferenceToSequence(EncodingUtils.createEndpointReference(consumerUrl, null));
}
} else {
endConsumers.setSequenceType(Constants.NoConsumers);
}
nbr.setEndConsumers(endConsumers);
EndProducers endProducers = new EndProducers();
if (producerList != null) {
endProducers.setSequenceType(Constants.EndProducers);