Package org.apache.qpid.server.exchange

Examples of org.apache.qpid.server.exchange.ExchangeRegistry.unregisterExchange()


                throw new AMQException( AMQConstant.NOT_ALLOWED, "Exchange in use as an alternate exchange", null);
            }

            synchronized(exchangeRegistry)
            {
                exchangeRegistry.unregisterExchange(getName(), false);
            }
        }
        catch(AMQException e)
        {
            throw new IllegalStateException(e);
View Full Code Here


            {
                exception(session, method, ExecutionErrorCode.NOT_ALLOWED, "Exchange '"+method.getExchange()+"' cannot be deleted");
            }
            else
            {
                exchangeRegistry.unregisterExchange(method.getExchange(), method.getIfUnused());

                if (exchange.isDurable() && !exchange.isAutoDelete())
                {
                    DurableConfigurationStore store = virtualHost.getMessageStore();
                    store.removeExchange(exchange);
View Full Code Here

            {
                exception(session, method, ExecutionErrorCode.NOT_ALLOWED, "Exchange '"+method.getExchange()+"' cannot be deleted");
            }
            else
            {
                exchangeRegistry.unregisterExchange(method.getExchange(), method.getIfUnused());

                if (exchange.isDurable() && !exchange.isAutoDelete())
                {
                    DurableConfigurationStore store = virtualHost.getMessageStore();
                    store.removeExchange(exchange);
View Full Code Here

                throw new AMQException( AMQConstant.NOT_ALLOWED, "Exchange in use as an alternate exchange", null);
            }

            synchronized(exchangeRegistry)
            {
                exchangeRegistry.unregisterExchange(getName(), false);
            }
        }
        catch(AMQException e)
        {
            throw new IllegalStateException(e);
View Full Code Here

        ExchangeRegistry exchangeRegistry = virtualHost.getExchangeRegistry();

        ExchangeDeleteBody body = evt.getMethod();
        try
        {
            exchangeRegistry.unregisterExchange(body.exchange, body.ifUnused);
            // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
            // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
            // Be aware of possible changes to parameter order as versions change.
            AMQFrame response = ExchangeDeleteOkBody.createAMQFrame(evt.getChannelId(), (byte)8, (byte)0);
            session.writeFrame(response);
View Full Code Here

            throw body.getConnectionException(AMQConstant.ACCESS_REFUSED, "Permission denied");
        }

        try
        {
            exchangeRegistry.unregisterExchange(body.getExchange(), body.getIfUnused());

            ExchangeDeleteOkBody responseBody = session.getMethodRegistry().createExchangeDeleteOkBody();
                       
            session.writeFrame(responseBody.generateFrame(channelId));
        }
View Full Code Here

            {
                exception(session, method, ExecutionErrorCode.NOT_ALLOWED, "Exchange '"+method.getExchange()+"' cannot be deleted");
            }
            else
            {
                exchangeRegistry.unregisterExchange(method.getExchange(), method.getIfUnused());

                if (exchange.isDurable() && !exchange.isAutoDelete())
                {
                    DurableConfigurationStore store = virtualHost.getDurableConfigurationStore();
                    store.removeExchange(exchange);
View Full Code Here

        {
            if(exchangeRegistry.getExchange(body.getExchange()) == null)
            {
                throw body.getChannelException(AMQConstant.NOT_FOUND, "No such exchange: " + body.getExchange());
            }
            exchangeRegistry.unregisterExchange(body.getExchange(), body.getIfUnused());

            ExchangeDeleteOkBody responseBody = session.getMethodRegistry().createExchangeDeleteOkBody();
                       
            session.writeFrame(responseBody.generateFrame(channelId));
        }
View Full Code Here

            {
                exception(session, method, ExecutionErrorCode.NOT_ALLOWED, "Exchange '"+method.getExchange()+"' cannot be deleted");
            }
            else
            {
                exchangeRegistry.unregisterExchange(method.getExchange(), method.getIfUnused());

                if (exchange.isDurable() && !exchange.isAutoDelete())
                {
                    DurableConfigurationStore store = virtualHost.getMessageStore();
                    store.removeExchange(exchange);
View Full Code Here

                throw new AMQException( AMQConstant.NOT_ALLOWED, "Exchange in use as an alternate exchange", null);
            }

            synchronized(exchangeRegistry)
            {
                exchangeRegistry.unregisterExchange(getName(), false);
            }
        }
        catch(AMQException e)
        {
            throw new IllegalStateException(e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.