@Override
public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException,
ReflectionException {
Throwable error = null;
MBeanServerPlugin delegate = null;
final boolean readOnly = true;
try {
delegate = findDelegate(name);
if (delegate.shouldAuthorize()) {
for(String attribute : attributes) {
authorizeMBeanOperation(delegate, name, GET_ATTRIBUTES, attribute, JmxAction.Impact.READ_ONLY);
}
}
return delegate.getAttributes(name, attributes);
} catch (Exception e) {
error = e;
if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e;
if (e instanceof ReflectionException) throw (ReflectionException)e;
throw makeRuntimeException(e);
} finally {
if (shouldAuditLog(delegate, readOnly)) {
new MBeanServerAuditLogRecordFormatter(this, error, readOnly).getAttributes(name, attributes);
}
}
}