Package org.apache.qpid.server.util

Examples of org.apache.qpid.server.util.ServerScopedRuntimeException


                sslContext.init(null, _trustStore.getTrustManagers(), null);
            }
            catch (NoSuchAlgorithmException e)
            {
                _logger.error("Exception creating SSLContext", e);
                throw new ServerScopedRuntimeException("Error creating SSLContext for trust store : " + _trustStore.getName() , e);
            }
            catch (KeyManagementException e)
            {
                _logger.error("Exception creating SSLContext", e);
                throw new ServerScopedRuntimeException("Error creating SSLContext for trust store : " + _trustStore.getName() , e);
            }
            catch (GeneralSecurityException e)
            {
                _logger.error("Exception creating SSLContext", e);
                throw new ServerScopedRuntimeException("Error creating SSLContext for trust store : " + _trustStore.getName() , e);
            }

            Class<? extends AbstractLDAPSSLSocketFactory> clazz = LDAPSSLSocketFactoryGenerator.createSubClass(clazzName, sslContext.getSocketFactory());
            if (_logger.isDebugEnabled())
            {
View Full Code Here


        {
            ctx = createInitialDirContext(env);
        }
        catch (NamingException e)
        {
            throw new ServerScopedRuntimeException("Unable to establish connection to the ldap server at " + _providerUrl, e);
        }
        finally
        {
            closeSafely(ctx);
        }
View Full Code Here

                sslContext = SSLContext.getInstance("TLS");
                sslContext.init(keyStore.getKeyManagers(), null, null);
            }
            catch (GeneralSecurityException e)
            {
                throw new ServerScopedRuntimeException("Unable to create SSLContext for key store", e);
            }

            getEventLogger().message(ManagementConsoleMessages.SSL_KEYSTORE(keyStore.getName()));

            //create the SSL RMI socket factories
View Full Code Here

                {
                    ManagedAttribute annotation = m.getAnnotation(ManagedAttribute.class);

                    if(!clazz.isInterface() || !ConfiguredObject.class.isAssignableFrom(clazz))
                    {
                        throw new ServerScopedRuntimeException("Can only define ManagedAttributes on interfaces which extend " + ConfiguredObject.class.getSimpleName() + ". " + clazz.getSimpleName() + " does not meet these criteria.");
                    }

                    ConfiguredObjectAttribute<?,?> attribute = new ConfiguredAutomatedAttribute<>(clazz, m, annotation);
                    if(attributeSet.contains(attribute))
                    {
                        attributeSet.remove(attribute);
                    }
                    attributeSet.add(attribute);
                }
                else if(m.isAnnotationPresent(DerivedAttribute.class))
                {
                    DerivedAttribute annotation = m.getAnnotation(DerivedAttribute.class);

                    if(!clazz.isInterface() || !ConfiguredObject.class.isAssignableFrom(clazz))
                    {
                        throw new ServerScopedRuntimeException("Can only define DerivedAttributes on interfaces which extend " + ConfiguredObject.class.getSimpleName() + ". " + clazz.getSimpleName() + " does not meet these criteria.");
                    }

                    ConfiguredObjectAttribute<?,?> attribute = new ConfiguredDerivedAttribute<>(clazz, m, annotation);
                    if(attributeSet.contains(attribute))
                    {
                        attributeSet.remove(attribute);
                    }
                    attributeSet.add(attribute);

                }
                else if(m.isAnnotationPresent(ManagedStatistic.class))
                {
                    ManagedStatistic statAnnotation = m.getAnnotation(ManagedStatistic.class);
                    if(!clazz.isInterface() || !ConfiguredObject.class.isAssignableFrom(clazz))
                    {
                        throw new ServerScopedRuntimeException("Can only define ManagedStatistics on interfaces which extend " + ConfiguredObject.class.getSimpleName() + ". " + clazz.getSimpleName() + " does not meet these criteria.");
                    }
                    ConfiguredObjectStatistic statistic = new ConfiguredObjectStatistic(clazz, m);
                    if(statisticSet.contains(statistic))
                    {
                        statisticSet.remove(statistic);
View Full Code Here

                        throw new IllegalArgumentException("Multiple definitions of the default context variable ${"+name+"}");
                    }
                }
                catch (IllegalAccessException e)
                {
                    throw new ServerScopedRuntimeException("Unexpected illegal access exception (only inspecting public static fields)", e);
                }
            }
        }
    }
View Full Code Here

                    }

                }
                else
                {
                    throw new ServerScopedRuntimeException("A state transition method must have no arguments. Method " + m.getName() + " on " + clazz.getName() + " does not meet this criteria.");
                }
            }
        }
    }
View Full Code Here

                        }
                        return new AutomatedField(field, beforeSet, afterSet);
                    }
                    catch (NoSuchMethodException e)
                    {
                        throw new ServerScopedRuntimeException("Cannot find method referenced by annotation for pre/post setting action", e);
                    }

                }
            }
            clazz = clazz.getSuperclass();
        }
        if(objClass.isInterface() || Modifier.isAbstract(objClass.getModifiers()))
        {
            return null;
        }
        throw new ServerScopedRuntimeException("Unable to find field definition for automated field " + attr.getName() + " in class " + objClass.getName());
    }
View Full Code Here

            mapper.writeValue(output, installedProtocols);
            return output.toString();
        }
        catch (IOException e)
        {
            throw new ServerScopedRuntimeException(e);
        }
    }
View Full Code Here

                {
                    this.wait();
                }
                catch (InterruptedException e)
                {
                    throw new ServerScopedRuntimeException(e);
                }
            }
            return null;
        }
View Full Code Here

        Set<Class<? extends ConfiguredObject>> candidates = new HashSet<Class<? extends ConfiguredObject>>();
        findBestFitInterface(getClass(), candidates);
        switch(candidates.size())
        {
            case 0:
                throw new ServerScopedRuntimeException("The configured object class " + getClass().getSimpleName() + " does not seem to implement an interface");
            case 1:
                return candidates.iterator().next();
            default:
                ArrayList<Class<? extends ConfiguredObject>> list = new ArrayList<>(candidates);

                throw new ServerScopedRuntimeException("The configured object class " + getClass().getSimpleName()
                        + " implements no single common interface which extends ConfiguredObject"
                        + " Identified candidates were : " + Arrays.toString(list.toArray()));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.util.ServerScopedRuntimeException

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.