Package javax.management

Examples of javax.management.MBeanParameterInfo


    }

    public void testCanInvokeMBean2() throws Exception {
        final ObjectName on = ObjectName.getInstance("foo.bar:type=Test");

        MBeanParameterInfo[] sig = new MBeanParameterInfo[]{new MBeanParameterInfo("arg1", "java.lang.String", "")};
        MBeanOperationInfo op = new MBeanOperationInfo("doit", "", sig, "int", MBeanOperationInfo.INFO);

        MBeanInfo info = EasyMock.createMock(MBeanInfo.class);
        EasyMock.expect(info.getOperations()).andReturn(new MBeanOperationInfo[]{op}).anyTimes();
        EasyMock.expect(info.getAttributes()).andReturn(new MBeanAttributeInfo[]{}).anyTimes();
View Full Code Here


    }

    public void testCanInvokeAnyOverload() throws Exception {
        final ObjectName on = ObjectName.getInstance("foo.bar:type=Test");

        MBeanParameterInfo[] sig = new MBeanParameterInfo[]{new MBeanParameterInfo("arg1", "java.lang.String", "")};
        MBeanOperationInfo op = new MBeanOperationInfo("doit", "", sig, "int", MBeanOperationInfo.INFO);
        MBeanParameterInfo[] sig2 = new MBeanParameterInfo[]{
                new MBeanParameterInfo("arg1", "java.lang.String", ""),
                new MBeanParameterInfo("arg2", "java.lang.String", "")};
        MBeanOperationInfo op2 = new MBeanOperationInfo("doit", "", sig2, "int", MBeanOperationInfo.INFO);

        MBeanInfo info = EasyMock.createMock(MBeanInfo.class);
        EasyMock.expect(info.getOperations()).andReturn(new MBeanOperationInfo[]{op, op2}).anyTimes();
        EasyMock.replay(info);
View Full Code Here

    }

    public void testCanInvokeAnyOverload2() throws Exception {
        final ObjectName on = ObjectName.getInstance("foo.bar:type=Test");

        MBeanParameterInfo[] sig = new MBeanParameterInfo[]{new MBeanParameterInfo("arg1", "java.lang.String", "")};
        MBeanOperationInfo op = new MBeanOperationInfo("foit", "", sig, "int", MBeanOperationInfo.INFO);
        MBeanParameterInfo[] sig2 = new MBeanParameterInfo[]{
                new MBeanParameterInfo("arg1", "java.lang.String", ""),
                new MBeanParameterInfo("arg2", "java.lang.String", "")};
        MBeanOperationInfo op2 = new MBeanOperationInfo("doit", "", sig2, "int", MBeanOperationInfo.INFO);

        MBeanInfo info = EasyMock.createMock(MBeanInfo.class);
        EasyMock.expect(info.getOperations()).andReturn(new MBeanOperationInfo[]{op, op2}).anyTimes();
        EasyMock.expect(info.getAttributes()).andReturn(new MBeanAttributeInfo[]{}).anyTimes();
View Full Code Here

            for (Class<?> paramType: m.getParameterTypes()) {
                String paramName = "p" + (i ++);
                if (getPropertyEditor(source.getClass(), paramName, paramType) == null) {
                    continue;
                }
                signature.add(new MBeanParameterInfo(
                        paramName, convertType(
                                null, null, paramType, true).getName(),
                        paramName));
            }
   
View Full Code Here

                "findMonitorDeadlockedThreads", nullParams, "[J",
                MBeanOperationInfo.ACTION_INFO);

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[1];
            params[0] = new MBeanParameterInfo("id", Long.TYPE.getName(), "id");
            operations[1] = new MBeanOperationInfo("getThreadCpuTime",
                    "getThreadCpuTime", params, Long.TYPE.getName(),
                    MBeanOperationInfo.ACTION_INFO);
        }

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[1];
            params[0] = new MBeanParameterInfo("id", Long.TYPE.getName(), "id");
            operations[2] = new MBeanOperationInfo("getThreadInfo",
                    "getThreadInfo", params, CompositeData.class.getName(),
                    MBeanOperationInfo.ACTION_INFO);
        }

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[1];
            params[0] = new MBeanParameterInfo("ids", "[J", "ids");
            operations[3] = new MBeanOperationInfo("getThreadInfo",
                    "getThreadInfo", params, "[L"
                            + CompositeData.class.getName() + ";",
                    MBeanOperationInfo.ACTION_INFO);
        }

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[2];
            params[0] = new MBeanParameterInfo("ids", "[J", "ids");
            params[1] = new MBeanParameterInfo("maxDepth", Integer.TYPE
                    .getName(), "maxDepth");
            operations[4] = new MBeanOperationInfo("getThreadInfo",
                    "getThreadInfo", params, "[L"
                            + CompositeData.class.getName() + ";",
                    MBeanOperationInfo.ACTION_INFO);
        }

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[2];
            params[0] = new MBeanParameterInfo("id", Long.TYPE.getName(), "id");
            params[1] = new MBeanParameterInfo("maxDepth", Integer.TYPE
                    .getName(), "maxDepth");
            operations[5] = new MBeanOperationInfo("getThreadInfo",
                    "getThreadInfo", params, CompositeData.class.getName(),
                    MBeanOperationInfo.ACTION_INFO);
        }

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[1];
            params[0] = new MBeanParameterInfo("id", Long.TYPE.getName(), "id");
            operations[6] = new MBeanOperationInfo("getThreadUserTime",
                    "getThreadUserTime", params, Long.TYPE.getName(),
                    MBeanOperationInfo.ACTION_INFO);
        }
View Full Code Here

        // Operations
        MBeanOperationInfo[] operations = new MBeanOperationInfo[3];

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[1];
            params[0] = new MBeanParameterInfo("loggerName", String.class
                    .getName(), "loggerName");
            operations[0] = new MBeanOperationInfo("getLoggerLevel",
                    "getLoggerLevel", params, String.class.getName(),
                    MBeanOperationInfo.ACTION_INFO);
        }

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[1];
            params[0] = new MBeanParameterInfo("loggerName", String.class
                    .getName(), "loggerName");
            operations[1] = new MBeanOperationInfo("getParentLoggerName",
                    "getParentLoggerName", params, String.class.getName(),
                    MBeanOperationInfo.ACTION_INFO);
        }

        {
            MBeanParameterInfo[] params = new MBeanParameterInfo[2];
            params[0] = new MBeanParameterInfo("loggerName", String.class
                    .getName(), "loggerName");
            params[1] = new MBeanParameterInfo("levelName", String.class
                    .getName(), "levelName");
            operations[2] = new MBeanOperationInfo("setLoggerLevel",
                    "setLoggerLevel", params, Void.TYPE.getName(),
                    MBeanOperationInfo.ACTION_INFO);
        }
View Full Code Here

              params,
              "void",
              MBeanOperationInfo.ACTION);

    params = new MBeanParameterInfo[1];
    params[0] = new MBeanParameterInfo("layout class", "java.lang.String",
               "layout class");

    dOperations[1] = new MBeanOperationInfo("setLayout",
              "setLayout(): add a layout",
              params,
View Full Code Here




    MBeanParameterInfo[] params = new MBeanParameterInfo[2];
    params[0] = new MBeanParameterInfo("class name", "java.lang.String",
               "add an appender to this logger");
    params[1] = new MBeanParameterInfo("appender name", "java.lang.String",
               "name of the appender");

    dOperations[0] = new MBeanOperationInfo("addAppender",
              "addAppender(): add an appender",
              params,
View Full Code Here

             true,
             true,
             false));

    MBeanParameterInfo[] params = new MBeanParameterInfo[1];
    params[0] = new MBeanParameterInfo("name", "java.lang.String",
               "Create a logger MBean" );
    dOperations[0] = new MBeanOperationInfo("addLoggerMBean",
            "addLoggerMBean(): add a loggerMBean",
            params ,
            "javax.management.ObjectName",
View Full Code Here

      return new MBeanOperationInfo("name", "description", new MBeanParameterInfo[]{createMBeanParameterInfo()}, "java.lang.Exception", MBeanOperationInfo.UNKNOWN);
   }

   public MBeanParameterInfo createMBeanParameterInfo()
   {
      return new MBeanParameterInfo("name", "java.lang.Object", "description");
   }
View Full Code Here

TOP

Related Classes of javax.management.MBeanParameterInfo

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.