Examples of JmxManaged


Examples of org.apache.deltaspike.core.api.jmx.JmxManaged

        // methods
        for (Method method : annotatedMBean.getMethods())
        {
            final int modifiers = method.getModifiers();
            final JmxManaged annotation = method.getAnnotation(JmxManaged.class);
            if (method.getDeclaringClass().equals(Object.class)
                    || !Modifier.isPublic(modifiers)
                    || Modifier.isAbstract(modifiers)
                    || Modifier.isStatic(modifiers)
                    || annotation == null)
            {
                continue;
            }

            operations.put(method.getName(), method);

            String operationDescr = getDescription(annotation.description(), method.getName());

            operationInfos.add(new MBeanOperationInfo(operationDescr, method));
        }

        Class<?> clazz = annotatedMBean;
        while (!Object.class.equals(clazz) && clazz != null)
        {
            for (Field field : clazz.getDeclaredFields())
            {
                final JmxManaged annotation = field.getAnnotation(JmxManaged.class);
                if (annotation != null)
                {
                    field.setAccessible(true);

                    final String fieldName = field.getName();
                    final String fieldDescription = getDescription(annotation.description(), fieldName);
                    final Class<?> type = field.getType();

                    final String methodName;
                    if (fieldName.length() > 1)
                    {
View Full Code Here

Examples of voldemort.annotations.jmx.JmxManaged

     * @return The ModelMBean for the given object
     */
    public static ModelMBean createModelMBean(Object o) {
        try {
            ModelMBean mbean = new RequiredModelMBean();
            JmxManaged annotation = o.getClass().getAnnotation(JmxManaged.class);
            String description = annotation == null ? "" : annotation.description();
            ModelMBeanInfo info = new ModelMBeanInfoSupport(o.getClass().getName(),
                                                            description,
                                                            extractAttributeInfo(o),
                                                            new ModelMBeanConstructorInfo[0],
                                                            extractOperationInfo(o),
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.