Package javax.management

Examples of javax.management.MBeanConstructorInfo


        super(options);
    }

    public String stringify(Object o)
    {
        final MBeanConstructorInfo constructor = (MBeanConstructorInfo) o;

        final String name = constructor.getName();
        final int lastDot = name.lastIndexOf(".");
        final String abbreviatedName = name.substring(lastDot + 1, name.length());

        final String params = "(" +
                              ParamsToString(constructor.getSignature(), mOptions) + ")";

        return (abbreviatedName + params);
    }
View Full Code Here


            String className = this.getClass().getName();
            MBeanAttributeInfo[] attrInfos = (MBeanAttributeInfo[]) allAttrs.toArray(new MBeanAttributeInfo[ allAttrs.size() ]);
            Class[] ctorArgClasses = {PooledDataSource.class, String.class, MBeanServer.class};
            MBeanConstructorInfo[] constrInfos
               = new MBeanConstructorInfo[] { new MBeanConstructorInfo("Constructor from PooledDataSource", this.getClass().getConstructor(ctorArgClasses)) };
            this.info = new MBeanInfo( this.getClass().getName(),
                            "An MBean to monitor and manage a PooledDataSource",
                            attrInfos,
                            constrInfos,
                            OP_INFS,
View Full Code Here

    private static MBeanConstructorInfo[] findConstructors(Class<?> c) {
        Constructor<?>[] cons = c.getConstructors();
        MBeanConstructorInfo[] mbc = new MBeanConstructorInfo[cons.length];
        for (int i = 0; i < cons.length; i++) {
            final String descr = "Public constructor of the MBean";
            mbc[i] = new MBeanConstructorInfo(descr, cons[i]);
        }
        return mbc;
    }
View Full Code Here

    {
        List<MBeanConstructorInfo> constructors = new ArrayList<MBeanConstructorInfo>();

        for (Constructor cons : implClass.getConstructors())
        {
            MBeanConstructorInfo constructorInfo = getMBeanConstructorInfo(cons);
            //MBeanConstructorInfo constructorInfo = new MBeanConstructorInfo("desc", cons);
            if (constructorInfo != null)
                constructors.add(constructorInfo);
        }
View Full Code Here

        }

        //MBeanParameterInfo[] paramsInfo = getParametersInfo(cons.getParameterAnnotations(),
        //                                                    cons.getParameterTypes());

        return new MBeanConstructorInfo(cons.getName(), desc, null);
    }
View Full Code Here

        // Create the associated ModelMBeanInfo
        ModelMBeanInfo info = http.createMBeanInfo();
        assertNotNull("Found HttpConnector ModelMBeanInfo", info);

        // Retrieve the relevant MBeanConstructorInfo array
        MBeanConstructorInfo mcinfo[] = info.getConstructors();
        assertNotNull("Found HttpConnector MBeanConstructorInfo array", mcinfo);
        assertEquals("Found HttpConnector MBeanConstructorInfo entry",
                     1, mcinfo.length);

        // Cast first entry to ModelMBeanConstructorInfo
View Full Code Here

            System.out.println("  description=" + info.getDescription());
            System.out.println("  mbeanDescriptor=" + info.getMBeanDescriptor());
            MBeanAttributeInfo attrs[] = info.getAttributes();
            for (int i = 0; i < attrs.length; i++)
                System.out.println("  AttributeInfo=" + attrs[i]);
            MBeanConstructorInfo consts[] = info.getConstructors();
            for (int i = 0; i < consts.length; i++)
                System.out.println("  ConstructorInfo=" + consts[i]);
            Descriptor descs[] = info.getDescriptors(null);
            for (int i = 0; i < descs.length; i++)
                System.out.println("  Descriptor=" + descs[i]);
View Full Code Here

            System.out.println("  description=" + info.getDescription());
            System.out.println("  mbeanDescriptor=" + info.getMBeanDescriptor());
            MBeanAttributeInfo attrs[] = info.getAttributes();
            for (int i = 0; i < attrs.length; i++)
                System.out.println("  AttributeInfo=" + attrs[i]);
            MBeanConstructorInfo consts[] = info.getConstructors();
            for (int i = 0; i < consts.length; i++)
                System.out.println("  ConstructorInfo=" + consts[i]);
            Descriptor descs[] = info.getDescriptors(null);
            for (int i = 0; i < descs.length; i++)
                System.out.println("  Descriptor=" + descs[i]);
View Full Code Here

        // Create the associated ModelMBeanInfo
        ModelMBeanInfo info = http.createMBeanInfo();
        assertNotNull("Found HttpConnector ModelMBeanInfo", info);

        // Retrieve the relevant MBeanConstructorInfo array
        MBeanConstructorInfo mcinfo[] = info.getConstructors();
        assertNotNull("Found HttpConnector MBeanConstructorInfo array", mcinfo);
        assertEquals("Found HttpConnector MBeanConstructorInfo entry",
                     1, mcinfo.length);

        // Cast first entry to ModelMBeanConstructorInfo
View Full Code Here

    {
        List<MBeanConstructorInfo> constructors = new ArrayList<MBeanConstructorInfo>();

        for (Constructor cons : implClass.getConstructors())
        {
            MBeanConstructorInfo constructorInfo = getMBeanConstructorInfo(cons);
            if (constructorInfo != null)
            {
                constructors.add(constructorInfo);
            }
        }
View Full Code Here

TOP

Related Classes of javax.management.MBeanConstructorInfo

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.