private void addMBeanExpressionSupport(Map<String, String> descriptions) { if (legacy) { descriptions.put(DESC_MBEAN_EXPR, "true"); descriptions.put(DESC_MBEAN_EXPR_DESCR, MESSAGES.descriptorMBeanExpressionSupportFalse()); if (configuredDomains.getExprDomain() != null) { ObjectName alternate = configuredDomains.getMirroredObjectName(name); descriptions.put(DESC_ALTERNATE_MBEAN, alternate.toString()); descriptions.put( DESC_ALTERNATE_MBEAN_DESCR, MESSAGES.descriptorAlternateMBeanExpressions(alternate)); } } else { descriptions.put(DESC_MBEAN_EXPR, "false"); descriptions.put(DESC_MBEAN_EXPR_DESCR, MESSAGES.descriptorMBeanExpressionSupportTrue()); if (configuredDomains.getLegacyDomain() != null) { ObjectName alternate = configuredDomains.getMirroredObjectName(name); descriptions.put(DESC_ALTERNATE_MBEAN, alternate.toString()); descriptions.put( DESC_ALTERNATE_MBEAN_DESCR, MESSAGES.descriptorAlternateMBeanLegacy(alternate)); } } }
private MBeanInfoFactory( final ObjectName name, final TypeConverters converters, final ConfiguredDomains configuredDomains, final boolean standalone, final PathAddress address, final ImmutableManagementResourceRegistration resourceRegistration) { this.name = name; this.converters = converters; this.configuredDomains = configuredDomains; this.standalone = standalone; this.legacy = configuredDomains.isLegacyDomain(name); this.resourceRegistration = resourceRegistration; DescriptionProvider provider = resourceRegistration.getModelDescription(PathAddress.EMPTY_ADDRESS); providedDescription = provider != null ? provider.getModelDescription(null) : new ModelNode(); this.pathAddress = address; }