javax.management.modelmbean.ModelMBeanConstructorInfo Java Examples

The following examples show how to use javax.management.modelmbean.ModelMBeanConstructorInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestModelMBean.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    try {
        ModelMBeanAttributeInfo[] attributes = new ModelMBeanAttributeInfo[0];
        ModelMBeanConstructorInfo[] constructors = new ModelMBeanConstructorInfo[] {
                new ModelMBeanConstructorInfo("-", this.getClass().getConstructor())
        };
        ModelMBeanOperationInfo[] operations = new ModelMBeanOperationInfo[] {
                new ModelMBeanOperationInfo("info", "-", new MBeanParameterInfo[0], Void.class.getName(), ModelMBeanOperationInfo.INFO),
                new ModelMBeanOperationInfo("action", "-", new MBeanParameterInfo[0], Void.class.getName(), ModelMBeanOperationInfo.ACTION),
                new ModelMBeanOperationInfo("actionInfo", "-", new MBeanParameterInfo[0], Void.class.getName(), ModelMBeanOperationInfo.ACTION_INFO),
                new ModelMBeanOperationInfo("unknown", "-", new MBeanParameterInfo[0], Void.class.getName(), ModelMBeanOperationInfo.UNKNOWN)
        };
        ModelMBeanNotificationInfo[] notifications = new ModelMBeanNotificationInfo[0];
        return new ModelMBeanInfoSupport(this.getClass().getName(), "-", attributes, constructors, operations, notifications);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
 
Example #2
Source File: ModelMBeanInfoSupporter.java    From cxf with Apache License 2.0 6 votes vote down vote up
public ModelMBeanInfo buildModelMBeanInfo(Descriptor desc)  {

        ModelMBeanOperationInfo[] ops =
            operations.values().toArray(new ModelMBeanOperationInfo[operations.values().size()]);

        ModelMBeanAttributeInfo[] atts =
            attributes.values().toArray(new ModelMBeanAttributeInfo[attributes.values().size()]);

        ModelMBeanConstructorInfo[] cons =
            constructors.values().toArray(new ModelMBeanConstructorInfo[constructors.values().size()]);

        ModelMBeanNotificationInfo[] notifs =
            notifications.values().toArray(new ModelMBeanNotificationInfo[notifications.values().size()]);

        return new ModelMBeanInfoSupport("javax.management.modelmbean.ModelMBeanInfo",
                                         "description",
                                         atts,
                                         cons,
                                         ops,
                                         notifs, desc);
    }
 
Example #3
Source File: ModelMBeanInfoSupporter.java    From cxf with Apache License 2.0 5 votes vote down vote up
public void addModelMBeanConstructor(Constructor<?> c,
                                      String description,
                                      Descriptor desc) {
    this.constructors.put(c,
                           new ModelMBeanConstructorInfo(description,
                                                         c,
                                                         desc));
}
 
Example #4
Source File: AbstractMBeanInfoAssembler.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Get the constructor metadata for the MBean resource. Subclasses should implement
 * this method to return the appropriate metadata for all constructors that should
 * be exposed in the management interface for the managed resource.
 * <p>Default implementation returns an empty array of {@code ModelMBeanConstructorInfo}.
 * @param managedBean the bean instance (might be an AOP proxy)
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the constructor metadata
 * @throws JMException in case of errors
 */
protected ModelMBeanConstructorInfo[] getConstructorInfo(Object managedBean, String beanKey)
		throws JMException {
	return new ModelMBeanConstructorInfo[0];
}
 
Example #5
Source File: AbstractMBeanInfoAssembler.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Get the constructor metadata for the MBean resource. Subclasses should implement
 * this method to return the appropriate metadata for all constructors that should
 * be exposed in the management interface for the managed resource.
 * <p>Default implementation returns an empty array of {@code ModelMBeanConstructorInfo}.
 * @param managedBean the bean instance (might be an AOP proxy)
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the constructor metadata
 * @throws JMException in case of errors
 */
protected ModelMBeanConstructorInfo[] getConstructorInfo(Object managedBean, String beanKey)
		throws JMException {
	return new ModelMBeanConstructorInfo[0];
}
 
Example #6
Source File: AbstractMBeanInfoAssembler.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Get the constructor metadata for the MBean resource. Subclasses should implement
 * this method to return the appropriate metadata for all constructors that should
 * be exposed in the management interface for the managed resource.
 * <p>Default implementation returns an empty array of {@code ModelMBeanConstructorInfo}.
 * @param managedBean the bean instance (might be an AOP proxy)
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the constructor metadata
 * @throws JMException in case of errors
 */
protected ModelMBeanConstructorInfo[] getConstructorInfo(Object managedBean, String beanKey)
		throws JMException {
	return new ModelMBeanConstructorInfo[0];
}
 
Example #7
Source File: AbstractMBeanInfoAssembler.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Get the constructor metadata for the MBean resource. Subclasses should implement
 * this method to return the appropriate metadata for all constructors that should
 * be exposed in the management interface for the managed resource.
 * <p>Default implementation returns an empty array of {@code ModelMBeanConstructorInfo}.
 * @param managedBean the bean instance (might be an AOP proxy)
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the constructor metadata
 * @throws JMException in case of errors
 */
protected ModelMBeanConstructorInfo[] getConstructorInfo(Object managedBean, String beanKey)
		throws JMException {
	return new ModelMBeanConstructorInfo[0];
}