ObjectName findMatchingMBeanPattern ( ObjectName pName ) { // Check all stored patterns for a match and return the pattern if one is found for ( ObjectName pattern : patterns ) { if ( pattern . apply ( pName ) ) { return pattern ; } } return null ; }
Given a MBean name return a pattern previously added and which matches this MBean name . Note that patterns might not overlap since the order in which they are tried is undefined .