Package org.apache.qpid.server.configuration

Examples of org.apache.qpid.server.configuration.IllegalConfigurationException


            {
                verifyGroupManager(manager, broker);
                return new GroupProviderAdapter(id, broker, manager, attributes,factory.getAttributeNames());
            }
        }
        throw new IllegalConfigurationException("No group provider factory found for configuration attributes " + attributes);
    }
View Full Code Here


            if (groupProvider instanceof GroupProviderAdapter)
            {
                GroupManager providerManager = ((GroupProviderAdapter) groupProvider).getGroupManager();
                if (manager.equals(providerManager))
                {
                    throw new IllegalConfigurationException("A group provider with the same settings already exists");
                }
            }
        }
    }
View Full Code Here

        Collection<TrustStore> trustStores = getTrustStores();
        boolean needClientCert = (Boolean)getAttribute(NEED_CLIENT_AUTH) || (Boolean)getAttribute(WANT_CLIENT_AUTH);
        if (needClientCert && trustStores.isEmpty())
        {
            throw new IllegalConfigurationException("Client certificate authentication is enabled on AMQP port '"
                    + this.getName() + "' but no trust store defined");
        }

        String keystorePath = (String)keyStore.getAttribute(KeyStore.PATH);
        String keystorePassword = keyStore.getPassword();
View Full Code Here

        if(changedValues.containsKey(TrustStore.NAME))
        {
            String newName = (String) changedValues.get(TrustStore.NAME);
            if(!getName().equals(newName))
            {
                throw new IllegalConfigurationException("Changing the trust store name is not allowed");
            }
        }

        Map<String, Object> merged = generateEffectiveAttributes(changedValues);
View Full Code Here

        {
            SSLUtil.getInitializedKeyStore(trustStorePath, password, type);
        }
        catch (Exception e)
        {
            throw new IllegalConfigurationException("Cannot instantiate trust store at " + trustStorePath, e);
        }

        try
        {
            TrustManagerFactory.getInstance(trustManagerFactoryAlgorithm);
        }
        catch (NoSuchAlgorithmException e)
        {
            throw new IllegalConfigurationException("Unknown trustManagerFactoryAlgorithm: " + trustManagerFactoryAlgorithm);
        }
    }
View Full Code Here

            {
                queueFlowControlResumeSize = (Long)getAttribute(QUEUE_FLOW_RESUME_SIZE_BYTES);
            }
            if (queueFlowControlResumeSize > queueFlowControlSize)
            {
                throw new IllegalConfigurationException("Flow resume size can't be greater than flow control size");
            }
        }
        for (Map.Entry<String, Object> entry: convertedAttributes.entrySet())
        {
            Object value = entry.getValue();
            if (value instanceof Number && ((Number)value).longValue() < 0)
            {
                throw new IllegalConfigurationException("Only positive integer value can be specified for the attribute "
                        + entry.getKey());
            }
        }
    }
View Full Code Here

        String newName = (String)attributes.get(NAME);
        String currentName = getName();
        if (!currentName.equals(newName))
        {
            throw new IllegalConfigurationException("Changing the name of authentication provider is not supported");
        }
        String newType = (String)attributes.get(AuthenticationManagerFactory.ATTRIBUTE_TYPE);
        String currentType = (String)getAttribute(AuthenticationManagerFactory.ATTRIBUTE_TYPE);
        if (!currentType.equals(newType))
        {
            throw new IllegalConfigurationException("Changing the type of authentication provider is not supported");
        }
        AuthenticationManagerFactory managerFactory = _factories.get(newType);
        if (managerFactory == null)
        {
            throw new IllegalConfigurationException("Cannot find authentication provider factory for type " + newType);
        }
        AuthenticationManager manager = managerFactory.createInstance(attributes);
        if (manager == null)
        {
            throw new IllegalConfigurationException("Cannot change authentication provider " + newName + " of type " + newType + " with the given attributes");
        }
        return manager;
    }
View Full Code Here

    public MessageStore createMessageStore(String storeType)
    {
        MessageStoreFactory factory = _factories.get(storeType.toLowerCase());
        if (factory == null)
        {
            throw new IllegalConfigurationException("Unknown store type: " + storeType);
        }
        return factory.createMessageStore();
    }
View Full Code Here

        {
            UUID id = getId();
            Object idAttributeValue = attributes.get(ID);
            if (idAttributeValue != null && !idAttributeValue.equals(id.toString()))
            {
                throw new IllegalConfigurationException("Cannot change existing configured object id");
            }
        }
    }
View Full Code Here

        if (!rmiRegistry)
        {
            String authProvider = (String)getAttribute(Port.AUTHENTICATION_PROVIDER);
            if (authProvider == null)
            {
                throw new IllegalConfigurationException("An authentication provider must be specified for port : " + getName());
            }
            _authenticationProvider = broker.findAuthenticationProviderByName(authProvider);

            if(_authenticationProvider == null)
            {
                throw new IllegalConfigurationException("The authentication provider '" + authProvider + "' could not be found for port : " + getName());
            }
        }

        _state = new AtomicReference<State>(state);
        addParent(Broker.class, broker);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.IllegalConfigurationException

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.