/** * Tests if the given {@link JmxAttributeDescriptor} matches the jmx bean sensor assignment. * * @param assignment * {@link JmxBeanSensorAssignment} * @param attributeDescriptor * {@link JmxAttributeDescriptor} to check * @return Returns <code>true</code> if the data in the descriptor fits the monitoring * definition in the assignment, <code>false</code> otherwise */ public boolean matches(JmxBeanSensorAssignment assignment, JmxAttributeDescriptor attributeDescriptor) { // not matching if the attribute is not readable if (!attributeDescriptor.ismBeanAttributeIsReadable()) { return false; } if (!matchesObjectName(assignment, attributeDescriptor.getmBeanObjectName())) { return false; } if (!matchesAttribute(assignment, attributeDescriptor.getAttributeName())) { return false; } return true; }