Java Code Examples for javax.management.MBeanOperationInfo#UNKNOWN

The following examples show how to use javax.management.MBeanOperationInfo#UNKNOWN . 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: MBeanInfoFactory.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
private OpenMBeanOperationInfo getOperation(String name, OpenMBeanParameterInfo addWildcardChildName, OperationEntry entry) {
    ModelNode opNode = entry.getDescriptionProvider().getModelDescription(null);
    OpenMBeanParameterInfo[] params = getParameterInfos(opNode);
    if (addWildcardChildName != null) {
        OpenMBeanParameterInfo[] newParams = new OpenMBeanParameterInfo[params.length + 1];
        newParams[0] = addWildcardChildName;
        System.arraycopy(params, 0, newParams, 1, params.length);
        params = newParams;
    }
    return new OpenMBeanOperationInfoSupport(
            name,
            getDescription(opNode),
            params,
            getReturnType(opNode),
            entry.getFlags().contains(Flag.READ_ONLY) ? MBeanOperationInfo.INFO : MBeanOperationInfo.UNKNOWN,
            createOperationDescriptor());
}
 
Example 2
Source File: AbstractReflectiveMBeanInfoAssembler.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * Creates an instance of {@code ModelMBeanOperationInfo} for the
 * given method. Populates the parameter info for the operation.
 * @param method the {@code Method} to create a {@code ModelMBeanOperationInfo} for
 * @param name the logical name for the operation (method name or property name);
 * not used by the default implementation but possibly by subclasses
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the {@code ModelMBeanOperationInfo}
 */
protected ModelMBeanOperationInfo createModelMBeanOperationInfo(Method method, String name, String beanKey) {
	MBeanParameterInfo[] params = getOperationParameters(method, beanKey);
	if (params.length == 0) {
		return new ModelMBeanOperationInfo(getOperationDescription(method, beanKey), method);
	}
	else {
		return new ModelMBeanOperationInfo(method.getName(),
			getOperationDescription(method, beanKey),
			getOperationParameters(method, beanKey),
			method.getReturnType().getName(),
			MBeanOperationInfo.UNKNOWN);
	}
}
 
Example 3
Source File: AbstractReflectiveMBeanInfoAssembler.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * Creates an instance of {@code ModelMBeanOperationInfo} for the
 * given method. Populates the parameter info for the operation.
 * @param method the {@code Method} to create a {@code ModelMBeanOperationInfo} for
 * @param name the logical name for the operation (method name or property name);
 * not used by the default implementation but possibly by subclasses
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the {@code ModelMBeanOperationInfo}
 */
protected ModelMBeanOperationInfo createModelMBeanOperationInfo(Method method, String name, String beanKey) {
	MBeanParameterInfo[] params = getOperationParameters(method, beanKey);
	if (params.length == 0) {
		return new ModelMBeanOperationInfo(getOperationDescription(method, beanKey), method);
	}
	else {
		return new ModelMBeanOperationInfo(method.getName(),
			getOperationDescription(method, beanKey),
			getOperationParameters(method, beanKey),
			method.getReturnType().getName(),
			MBeanOperationInfo.UNKNOWN);
	}
}
 
Example 4
Source File: AbstractReflectiveMBeanInfoAssembler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an instance of {@code ModelMBeanOperationInfo} for the
 * given method. Populates the parameter info for the operation.
 * @param method the {@code Method} to create a {@code ModelMBeanOperationInfo} for
 * @param name the logical name for the operation (method name or property name);
 * not used by the default implementation but possibly by subclasses
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the {@code ModelMBeanOperationInfo}
 */
protected ModelMBeanOperationInfo createModelMBeanOperationInfo(Method method, String name, String beanKey) {
	MBeanParameterInfo[] params = getOperationParameters(method, beanKey);
	if (params.length == 0) {
		return new ModelMBeanOperationInfo(getOperationDescription(method, beanKey), method);
	}
	else {
		return new ModelMBeanOperationInfo(method.getName(),
			getOperationDescription(method, beanKey),
			getOperationParameters(method, beanKey),
			method.getReturnType().getName(),
			MBeanOperationInfo.UNKNOWN);
	}
}
 
Example 5
Source File: AbstractReflectiveMBeanInfoAssembler.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an instance of {@code ModelMBeanOperationInfo} for the
 * given method. Populates the parameter info for the operation.
 * @param method the {@code Method} to create a {@code ModelMBeanOperationInfo} for
 * @param name the logical name for the operation (method name or property name);
 * not used by the default implementation but possibly by subclasses
 * @param beanKey the key associated with the MBean in the beans map
 * of the {@code MBeanExporter}
 * @return the {@code ModelMBeanOperationInfo}
 */
protected ModelMBeanOperationInfo createModelMBeanOperationInfo(Method method, String name, String beanKey) {
	MBeanParameterInfo[] params = getOperationParameters(method, beanKey);
	if (params.length == 0) {
		return new ModelMBeanOperationInfo(getOperationDescription(method, beanKey), method);
	}
	else {
		return new ModelMBeanOperationInfo(method.getName(),
			getOperationDescription(method, beanKey),
			getOperationParameters(method, beanKey),
			method.getReturnType().getName(),
			MBeanOperationInfo.UNKNOWN);
	}
}
 
Example 6
Source File: Dynamic.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    return new MBeanInfo(
            Dynamic.class.getName(), "MBean for RBAC testing of JMX non-core MBeans", null, null,
            new MBeanOperationInfo[] {
                    new MBeanOperationInfo("helloReadOnly", "helloReadOnly", null, "void", MBeanOperationInfo.INFO),
                    new MBeanOperationInfo("helloWriteOnly", "helloWriteOnly", null, "void", MBeanOperationInfo.ACTION),
                    new MBeanOperationInfo("helloReadWrite", "helloReadWrite", null, "void", MBeanOperationInfo.ACTION_INFO),
                    new MBeanOperationInfo("helloUnknown", "helloUnknown", null, "void", MBeanOperationInfo.UNKNOWN)
            },
            null, null
    );
}
 
Example 7
Source File: DynamicMBeanWrapper.java    From tomee with Apache License 2.0 5 votes vote down vote up
private MBeanOperationInfo newMethodDescriptor(final String operationDescr, final Method m) {
    final MBeanOperationInfo jvmInfo = new MBeanOperationInfo(operationDescr, m);
    return new MBeanOperationInfo(
        m.getName(),
        operationDescr,
        methodSignature(jvmInfo, m),
        m.getReturnType().getName(),
        MBeanOperationInfo.UNKNOWN,
        jvmInfo.getDescriptor()); // avoid to copy the logic
}
 
Example 8
Source File: ActiveMQServerControl.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Operation(desc = "Force the server to stop and notify clients to failover", impact = MBeanOperationInfo.UNKNOWN)
void forceFailover() throws Exception;
 
Example 9
Source File: ActiveMQServerControl.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Operation(desc = "Force the server to stop and to scale down to another server", impact = MBeanOperationInfo.UNKNOWN)
void scaleDown(@Parameter(name = "name", desc = "The connector to use to scale down, if not provided the first appropriate connector will be used") String connector) throws Exception;