if (ignoreOperationIfServerNotActive(context, operation)) {
return;
}
final AddressControl addressControl = getAddressControl(context, operation);
if (addressControl == null) {
PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
throw ControllerLogger.ROOT_LOGGER.managementResourceNotFound(address);
}
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
try {
if (ROLES_ATTR_NAME.equals(name)) {
String json = addressControl.getRolesAsJSON();
reportRoles(context, json);
} else if (QUEUE_NAMES.equals(name)) {
String[] queues = addressControl.getQueueNames();
reportListOfStrings(context, queues);
} else if (NUMBER_OF_BYTES_PER_PAGE.equals(name)) {
long l = addressControl.getNumberOfBytesPerPage();
context.getResult().set(l);
} else if (NUMBER_OF_PAGES.equals(name)) {
int i = addressControl.getNumberOfPages();
context.getResult().set(i);
} else if (BINDING_NAMES.equals(name)) {
String[] bindings = addressControl.getBindingNames();
reportListOfStrings(context, bindings);
} else {
// Bug
throw MessagingLogger.ROOT_LOGGER.unsupportedAttribute(name);
}