Package org.apache.qpid

Examples of org.apache.qpid.AMQSecurityException


    {
        // Check access
        if (!_host.getSecurityManager().authoriseCreateExchange(autoDelete, durable, exchange, null, null, null, type))
        {
            String description = "Permission denied: exchange-name '" + exchange.asString() + "'";
            throw new AMQSecurityException(description);
        }
       
        ExchangeType<? extends Exchange> exchType = _exchangeClassMap.get(type);
        if (exchType == null)
        {
View Full Code Here


        if(exchange != defaultExchange)
        {
            //Perform ACLs
            if (!_virtualHost.getSecurityManager().authoriseBind(exchange, queue, new AMQShortString(bindingKey)))
            {
                throw new AMQSecurityException("Permission denied: binding " + bindingKey);
            }
        }

        if (id == null)
        {
View Full Code Here

        if(exchange != defaultExchange)
        {
            // Check access
            if (!_virtualHost.getSecurityManager().authoriseUnbind(exchange, new AMQShortString(bindingKey), queue))
            {
                throw new AMQSecurityException("Permission denied: unbinding " + bindingKey);
            }
        }
       
        BindingImpl b = _bindings.remove(new BindingImpl(null, bindingKey,queue,exchange,arguments));
View Full Code Here

    public void setPublishFrame(MessagePublishInfo info, final Exchange e) throws AMQSecurityException
    {
        String routingKey = info.getRoutingKey() == null ? null : info.getRoutingKey().asString();
        if (!getVirtualHost().getSecurityManager().authorisePublish(info.isImmediate(), routingKey, e.getName()))
        {
            throw new AMQSecurityException("Permission denied: " + e.getName());
        }
        _currentMessage = new IncomingMessage(info, getProtocolSession().getReference());
        _currentMessage.setExchange(e);
    }
View Full Code Here

    {
        String routingKey = info.getRoutingKey() == null ? null : info.getRoutingKey().asString();
        SecurityManager securityManager = getVirtualHost().getSecurityManager();
        if (!securityManager.authorisePublish(info.isImmediate(), routingKey, e.getName()))
        {
            throw new AMQSecurityException("Permission denied: " + e.getName());
        }
        _currentMessage = new IncomingMessage(info, getProtocolSession().getReference());
        _currentMessage.setExchange(e);
    }
View Full Code Here

            throw new AMQException(AMQConstant.NOT_FOUND, "Unknown exchange " + name, null);
        }

        if (!_host.getSecurityManager().authoriseDelete(exchange))
        {
            throw new AMQSecurityException();
        }

        // TODO: check inUse argument

        Exchange e = _exchangeMap.remove(name);
View Full Code Here

            throws AMQSecurityException, ExistingExclusiveSubscription, ExistingSubscriptionPreventsExclusive
    {
        // Access control
        if (!getVirtualHost().getSecurityManager().authoriseConsume(this))
        {
            throw new AMQSecurityException("Permission denied");
        }


        if (hasExclusiveSubscriber())
        {
View Full Code Here

    private long clear(final long request) throws AMQSecurityException
    {
        //Perform ACLs
        if (!getVirtualHost().getSecurityManager().authorisePurge(this))
        {
            throw new AMQSecurityException("Permission denied: queue " + getName());
        }

        QueueEntryIterator queueListIterator = _entries.iterator();
        long count = 0;
View Full Code Here

    public int delete() throws AMQSecurityException, AMQException
    {
        // Check access
        if (!_virtualHost.getSecurityManager().authoriseDelete(this))
        {
            throw new AMQSecurityException("Permission denied: " + getName());
        }

        if (!_deleted.getAndSet(true))
        {
View Full Code Here

    public void flushSubscription(Subscription sub) throws AMQException
    {
        // Access control
        if (!getVirtualHost().getSecurityManager().authoriseConsume(this))
        {
            throw new AMQSecurityException("Permission denied: " + getName());
        }
        flushSubscription(sub, Long.MAX_VALUE);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.AMQSecurityException

Copyright © 2018 www.massapicom. 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.