use of org.apache.qpid.server.model.DoOnConfigThread in project qpid-broker-j by apache.
the class AbstractExchange method destinationRemoved.
@Override
@DoOnConfigThread
public void destinationRemoved(@Param(name = "destination") final MessageDestination destination) {
Iterator<Binding> bindingIterator = _bindings.iterator();
while (bindingIterator.hasNext()) {
Binding b = bindingIterator.next();
if (b.getDestination().equals(destination.getName())) {
final Map<String, Object> bindArguments = UNBIND_ARGUMENTS_CREATOR.createMap(b.getBindingKey(), destination);
getEventLogger().message(_logSubject, BindingMessages.DELETED(String.valueOf(bindArguments)));
onUnbind(new BindingIdentifier(b.getBindingKey(), destination));
_bindings.remove(b);
}
}
if (!autoDeleteIfNecessary()) {
if (destination.isDurable() && isDurable()) {
final Collection<Binding> durableBindings = getDurableBindings();
attributeSet(DURABLE_BINDINGS, durableBindings, durableBindings);
}
}
}
Aggregations