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 ; }
Checks is mbean with given domain and class required by this configuration .