Package org.apache.qpid.server.util

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


                   && !Modifier.isStatic(method.getModifiers()))
                {
                    return attribute;
                }
            }
            throw new ServerScopedRuntimeException("Unable to find attribute definition for method " + method.getName());
        }
View Full Code Here


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

                }

            }
            if (categoryFactories.put(factory.getType(), factory) != null)
            {
                throw new ServerScopedRuntimeException(
                        "Misconfiguration - there is more than one factory defined for class " + categoryName
                        + " with type " + factory.getType());
            }
            if (factory.getType() != null)
            {
View Full Code Here

                {
                    throw (AMQException) e.getCause();
                }
                else
                {
                    throw new ServerScopedRuntimeException(e.getCause());
                }
            }


        }
View Full Code Here

        {
            block.writePayload(_reusableDataOutput);
        }
        catch (IOException e)
        {
            throw new ServerScopedRuntimeException(e);
        }

        final ByteBuffer buf;

        if(size <= REUSABLE_BYTE_BUFFER_CAPACITY)
View Full Code Here

            mapper.writeValue(output, installedProtocols);
            return output.toString();
        }
        catch (IOException e)
        {
            throw new ServerScopedRuntimeException(e);
        }
    }
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

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.