use of org.jboss.as.controller.AttributeDefinition in project wildfly by wildfly.
the class BridgeDefinition 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);
}
}
BridgeControlHandler.INSTANCE.registerAttributes(registry);
}
use of org.jboss.as.controller.AttributeDefinition 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.AttributeDefinition in project wildfly by wildfly.
the class ModClusterSubsystemAdd method populateModel.
/**
* This is here so legacy configuration can be supported.
*/
@Override
protected void populateModel(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
if (operation.hasDefined(CommonAttributes.MOD_CLUSTER_CONFIG)) {
PathAddress opAddress = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR));
PathAddress parent = opAddress.append(ModClusterConfigResourceDefinition.PATH);
ModelNode targetOperation = Util.createAddOperation(parent);
for (AttributeDefinition def : ModClusterConfigResourceDefinition.ATTRIBUTES) {
def.validateAndSet(operation, targetOperation);
}
context.addStep(targetOperation, ModClusterConfigAdd.INSTANCE, OperationContext.Stage.MODEL, true);
}
// Inform handlers for child resources that we are part of the set of operations
// so they know we'll be utilizing any model they write. We do this in Stage.MODEL
// so in their Stage.MODEL they can decide to skip adding a runtime step
context.attach(SUBSYSTEM_ADD_KEY, Boolean.TRUE);
}
use of org.jboss.as.controller.AttributeDefinition in project wildfly by wildfly.
the class TransactionSubsystemAdd method populateModel.
@Override
protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException {
populateModelWithRecoveryEnvConfig(operation, model);
populateModelWithCoreEnvConfig(operation, model);
populateModelWithCoordinatorEnvConfig(operation, model);
populateModelWithObjectStoreConfig(operation, model);
TransactionSubsystemRootResourceDefinition.JTS.validateAndSet(operation, model);
validateStoreConfig(operation, model);
TransactionSubsystemRootResourceDefinition.USE_JOURNAL_STORE.validateAndSet(operation, model);
for (AttributeDefinition ad : TransactionSubsystemRootResourceDefinition.attributes_1_2) {
ad.validateAndSet(operation, model);
}
TransactionSubsystemRootResourceDefinition.JOURNAL_STORE_ENABLE_ASYNC_IO.validateAndSet(operation, model);
}
use of org.jboss.as.controller.AttributeDefinition in project wildfly by wildfly.
the class Filter method createHttpHandler.
public HttpHandler createHttpHandler(final Predicate predicate, final ModelNode model, HttpHandler next) {
List<AttributeDefinition> attributes = new ArrayList<>(getAttributes());
HttpHandler handler = createHandler(getHandlerClass(), model, attributes, next);
if (predicate != null) {
return Handlers.predicate(predicate, handler, next);
} else {
return handler;
}
}
Aggregations