public boolean isMBeanRequired(final String domainName, final String className) {

        if(domains == null || domains.length == 0)
            return true; // No domain configuration set. All domains should pass

        for(MBeanProducerDomainConfig domainConfig : domains)
            if(domainConfig.getName().equalsIgnoreCase(domainName)) {
                // Domain was found in configuration. Now checking mbean class.
                return ArrayUtils.contains(domainConfig.getClasses(), className);

        }

        // mbean with given domain and class is not required by configuration
        return false;

    }
public boolean isMBeanRequired ( final String domainName , final String className ) { if ( domains == null || domains . length == 0 ) return true ; for ( MBeanProducerDomainConfig domainConfig : domains ) if ( domainConfig . getName ( ) . equalsIgnoreCase ( domainName ) ) { return ArrayUtils . contains ( domainConfig . getClasses ( ) , className ) ; } return false ; }
Checks is mbean with given domain and class required by
this configuration.

@param domainName name of mbean domain
@param className class name of mbean
@return true  - configuration require to add this mbean as producer.
false - mbean should be skipped.