Search in sources :

Example 1 with DoOnConfigThread

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);
        }
    }
}
Also used : Binding(org.apache.qpid.server.model.Binding) AlternateBinding(org.apache.qpid.server.model.AlternateBinding) ConfiguredObject(org.apache.qpid.server.model.ConfiguredObject) AbstractConfiguredObject(org.apache.qpid.server.model.AbstractConfiguredObject) DoOnConfigThread(org.apache.qpid.server.model.DoOnConfigThread)

Aggregations

AbstractConfiguredObject (org.apache.qpid.server.model.AbstractConfiguredObject)1 AlternateBinding (org.apache.qpid.server.model.AlternateBinding)1 Binding (org.apache.qpid.server.model.Binding)1 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)1 DoOnConfigThread (org.apache.qpid.server.model.DoOnConfigThread)1