@Override public void registerAttributes(ManagementResourceRegistration registry) { super.registerAttributes(registry); AttributeDefinition[] attributes = deployed ? getDeploymentAttributes() : ATTRIBUTES; for (AttributeDefinition attr : attributes) { if (registerRuntimeOnly || !attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) { if (deployed) { registry.registerReadOnlyAttribute(attr, JMSQueueConfigurationRuntimeHandler.INSTANCE); } else { if (attr == CommonAttributes.DESTINATION_ENTRIES) { registry.registerReadWriteAttribute( attr, null, JMSQueueConfigurationWriteHandler.INSTANCE); } else { registry.registerReadOnlyAttribute(attr, null); } } } } if (registerRuntimeOnly) { for (AttributeDefinition attr : READONLY_ATTRIBUTES) { registry.registerReadOnlyAttribute(attr, JMSQueueReadAttributeHandler.INSTANCE); } for (AttributeDefinition metric : METRICS) { registry.registerMetric(metric, JMSQueueReadAttributeHandler.INSTANCE); } } }
@Override public void registerAttributes(ManagementResourceRegistration registry) { OperationStepHandler writeHandler = new ConnectorServiceWriteAttributeHandler(ATTRIBUTES); for (AttributeDefinition attr : ATTRIBUTES) { if (!attr.getFlags().contains(STORAGE_RUNTIME)) { registry.registerReadWriteAttribute(attr, null, writeHandler); } } }
@Override public void registerAttributes(ManagementResourceRegistration registry) { super.registerAttributes(registry); OperationStepHandler attributeHandler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES); for (AttributeDefinition attr : ATTRIBUTES) { if (registerRuntimeOnly || !attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) { registry.registerReadWriteAttribute(attr, null, attributeHandler); } } }
@Override public void registerAttributes(ManagementResourceRegistration registry) { super.registerAttributes(registry); for (AttributeDefinition attr : ATTRIBUTES) { if (registerRuntimeOnly || !attr.getFlags().contains(STORAGE_RUNTIME)) { registry.registerReadWriteAttribute( attr, null, BroadcastGroupWriteAttributeHandler.INSTANCE); } } if (registerRuntimeOnly) { BroadcastGroupControlHandler.INSTANCE.registerAttributes(registry); } }
@Override public void registerMetric(AttributeDefinition definition, OperationStepHandler metricHandler) { checkPermission(); AttributeAccess aa = new AttributeAccess( AccessType.METRIC, AttributeAccess.Storage.RUNTIME, metricHandler, null, definition, definition.getFlags()); if (attributesUpdater.putIfAbsent(this, definition.getName(), aa) != null) { throw alreadyRegistered("attribute", definition.getName()); } registerAttributeAccessConstraints(definition); }
@Override public void registerReadOnlyAttribute( final AttributeDefinition definition, final OperationStepHandler readHandler) { checkPermission(); final EnumSet<AttributeAccess.Flag> flags = definition.getFlags(); final String attributeName = definition.getName(); AttributeAccess.Storage storage = (flags != null && flags.contains(AttributeAccess.Flag.STORAGE_RUNTIME)) ? Storage.RUNTIME : Storage.CONFIGURATION; AttributeAccess aa = new AttributeAccess(AccessType.READ_ONLY, storage, readHandler, null, definition, flags); if (attributesUpdater.putIfAbsent(this, attributeName, aa) != null) { throw alreadyRegistered("attribute", attributeName); } registerAttributeAccessConstraints(definition); }
@Override public void registerAttributes(ManagementResourceRegistration registry) { super.registerAttributes(registry); for (AttributeDefinition attr : ATTRIBUTES) { // deprecated attributes if (attr == Common.DISCOVERY_INITIAL_WAIT_TIMEOUT || attr == Common.FAILOVER_ON_SERVER_SHUTDOWN) { registry.registerReadWriteAttribute(attr, null, DeprecatedAttributeWriteHandler.INSTANCE); } else { if (registerRuntimeOnly || !attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) { registry.registerReadWriteAttribute( attr, null, ConnectionFactoryWriteAttributeHandler.INSTANCE); } } } if (registerRuntimeOnly) { for (AttributeDefinition attr : READONLY_ATTRIBUTES) { registry.registerReadOnlyAttribute(attr, ConnectionFactoryReadAttributeHandler.INSTANCE); } } }