Java 8 MBeanConstructorInfo - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 MBeanConstructorInfo class.

This code example shows how to use the following methods:
  private 
  void buildDynamicMBeanInfo() { 
    Constructor[] constructors = this.getClass().getConstructors();
    dConstructors[0] = new MBeanConstructorInfo(
         "HierarchyDynamicMBean(): Constructs a HierarchyDynamicMBean instance", 
	 constructors[0]);
 
    vAttributes.add(new MBeanAttributeInfo(THRESHOLD,
					   "java.lang.String", 
					   "The \"threshold\" state of the hiearchy.", 
					   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 ,
4
CodeRank
This code example shows how to use the following methods:
  private 
  void buildDynamicMBeanInfo() { 
    Constructor[] constructors = this.getClass().getConstructors();
    dConstructors[0] = new MBeanConstructorInfo(
             "HierarchyDynamicMBean(): Constructs a HierarchyDynamicMBean instance", 
	     constructors[0]);
 
    dAttributes.add(new MBeanAttributeInfo("name",
					   "java.lang.String", 
					   "The name of this Logger.", 
					   true, 
					   false, 
					   false)); 
 
    dAttributes.add(new MBeanAttributeInfo("priority",
					   "java.lang.String", 
					   "The priority of this logger.", 
					   true, 
					   true, 
					   false)); 
4
CodeRank
This code example shows how to use the following methods:
            new MBeanParameterInfo("name", "type", "descr");
        MBeanParameterInfo[] params = new MBeanParameterInfo[] {mbpi};
        mbci1 =
            new MBeanConstructorInfo("name", "descr", null);
        mbci2 =
            new MBeanConstructorInfo("name", "descr", params);
        mbni1 =
            new MBeanNotificationInfo(null, "name", "descr");
        mbni2 =
            new MBeanNotificationInfo(new String[] {"type"}, "name", "descr");
        mboi1 =
            new MBeanOperationInfo("name", "descr", null, "type", ACTION);
        mboi2 =
            new MBeanOperationInfo("name", "descr", params, "type", INFO);
        mbi1 =
            new MBeanInfo("class", "descr", null, null, null, null);
        mbi2 =
            new MBeanInfo(
                "class", "descr", 
                new MBeanAttributeInfo[] {mbai},
4
CodeRank
This code example shows how to use the following methods:
desc = _defaultConstructorDescription;
            } 
        } 
 
        return new MBeanConstructorInfo(cons.getName(), desc, null);
    } 
 
    /** 
     * Retrieves the description from the annotations of given class 
     * @param annotatedClass 
     * @return class description 
     */ 
    static String getMBeanDescription(Class annotatedClass)
    { 
        Annotation anno = annotatedClass.getAnnotation(MBeanDescription.class);
        if (anno != null && MBeanDescription.class.isInstance(anno))
        { 
            return MBeanDescription.class.cast(anno).value();
        } 
4
CodeRank
See Code Examples for Java 8 MBeanConstructorInfo Methods: