in hawtio-system/src/main/java/io/hawt/jmx/RBACRegistry.java [255:293]
private String isSpecialMBean(ObjectName nameObject) {
String domain = nameObject.getDomain();
switch (domain) {
case "org.apache.activemq":
final String destinationType = nameObject.getKeyProperty("destinationType");
// see: org.apache.activemq.command.ActiveMQDestination.getDestinationTypeAsString()
if ("Queue".equals(destinationType)) {
return "activemq:queue";
}
if ("TempQueue".equals(destinationType)) {
return "activemq:tempqueue";
}
if ("Topic".equals(destinationType)) {
return "activemq:topic";
}
if ("TempTopic".equals(destinationType)) {
return "activemq:temptopic";
}
break;
case "org.apache.activemq.artemis":
final String component = nameObject.getKeyProperty("component");
if ("addresses".equals(component)) {
final String subComponent = nameObject.getKeyProperty("subcomponent");
if (subComponent == null) {
return "activemq.artemis:address";
}
if ("queues".equals(subComponent)) {
return "activemq.artemis:queue";
}
}
break;
case "org.apache.camel":
//final String type = nameObject.getKeyProperty("type");
// TODO: verify: "type" attribute is not enough - we have to know real class of MBean
return null;
}
return null;
}