use of org.apache.activemq.artemis.api.core.management.Operation in project activemq-artemis by apache.
the class MBeanInfoHelper method getOperationInfo.
private static MBeanOperationInfo getOperationInfo(final Method operation) {
MBeanOperationInfo info = null;
Class<?> returnType = operation.getReturnType();
MBeanParameterInfo[] paramsInfo = MBeanInfoHelper.getParametersInfo(operation.getParameterAnnotations(), operation.getParameterTypes());
String description = operation.getName();
int impact = MBeanOperationInfo.UNKNOWN;
if (operation.getAnnotation(Operation.class) != null) {
description = operation.getAnnotation(Operation.class).desc();
impact = operation.getAnnotation(Operation.class).impact();
}
info = new MBeanOperationInfo(operation.getName(), description, paramsInfo, returnType.getName(), impact);
return info;
}
Aggregations