use of org.jboss.as.controller.ReloadRequiredWriteAttributeHandler in project wildfly by wildfly.
the class AbstractFederationResourceDefinition method createAttributeWriterHandler.
@Override
protected OperationStepHandler createAttributeWriterHandler() {
List<SimpleAttributeDefinition> attributes = getAttributes();
final List<AttributeDefinition> alternativeAttributes = getAlternativesAttributes();
return new ReloadRequiredWriteAttributeHandler(attributes.toArray(new AttributeDefinition[attributes.size()])) {
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
if (!alternativeAttributes.isEmpty()) {
context.addStep(new AlternativeAttributeValidationStepHandler(alternativeAttributes.toArray(new AttributeDefinition[alternativeAttributes.size()])), OperationContext.Stage.MODEL);
}
doRegisterModelWriteAttributeHandler(context, operation);
super.execute(context, operation);
}
};
}
use of org.jboss.as.controller.ReloadRequiredWriteAttributeHandler in project wildfly by wildfly.
the class JdbcJobRepositoryDefinition method registerAttributes.
@Override
public void registerAttributes(final ManagementResourceRegistration resourceRegistration) {
super.registerAttributes(resourceRegistration);
resourceRegistration.registerReadWriteAttribute(DATA_SOURCE, null, new ReloadRequiredWriteAttributeHandler(DATA_SOURCE));
}
use of org.jboss.as.controller.ReloadRequiredWriteAttributeHandler in project wildfly by wildfly.
the class ClusterConnectionDefinition method registerAttributes.
@Override
public void registerAttributes(ManagementResourceRegistration registry) {
ReloadRequiredWriteAttributeHandler reloadRequiredWriteAttributeHandler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES);
for (AttributeDefinition attr : ATTRIBUTES) {
if (!attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) {
registry.registerReadWriteAttribute(attr, null, reloadRequiredWriteAttributeHandler);
}
}
ClusterConnectionControlHandler.INSTANCE.registerAttributes(registry);
for (AttributeDefinition attr : READONLY_ATTRIBUTES) {
registry.registerReadOnlyAttribute(attr, ClusterConnectionControlHandler.INSTANCE);
}
}
use of org.jboss.as.controller.ReloadRequiredWriteAttributeHandler in project wildfly by wildfly.
the class PathDefinition method registerAttributes.
@Override
public void registerAttributes(ManagementResourceRegistration registry) {
AttributeDefinition[] attributes = getAttributes(path.getValue());
OperationStepHandler attributeHandler = new ReloadRequiredWriteAttributeHandler(attributes);
for (AttributeDefinition attribute : attributes) {
registry.registerReadWriteAttribute(attribute, null, attributeHandler);
}
}
use of org.jboss.as.controller.ReloadRequiredWriteAttributeHandler in project wildfly by wildfly.
the class JPADefinition method registerAttributes.
@Override
public void registerAttributes(ManagementResourceRegistration registration) {
registration.registerReadWriteAttribute(DEFAULT_DATASOURCE, null, new ReloadRequiredWriteAttributeHandler(DEFAULT_DATASOURCE));
registration.registerReadWriteAttribute(DEFAULT_EXTENDEDPERSISTENCE_INHERITANCE, null, new ReloadRequiredWriteAttributeHandler(DEFAULT_EXTENDEDPERSISTENCE_INHERITANCE));
}
Aggregations