ResourceBuilder builder = ResourceBuilder.Factory.create(ProtocolResourceDefinition.pathElement(protocolName), resolver);
ProtocolMetricsHandler handler = new ProtocolMetricsHandler();
for (Map.Entry<String, Attribute> entry: handler.findProtocolAttributes(protocolClass).entrySet()) {
String name = entry.getKey();
Attribute attribute = entry.getValue();
FieldType type = FieldType.valueOf(attribute.getType());
resolver.addDescription(name, attribute.getDescription());
builder.addMetric(new SimpleAttributeDefinitionBuilder(name, type.getModelType()).setStorageRuntime().build(), handler);
}
return builder.build();
} catch (ClassNotFoundException e) {