@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> voidHandbackHolder) throws OperationFailedException { applyUpdateToConfig(config, attributeName, resolvedValue); return false; }
@Override public void registerAttributes(final ManagementResourceRegistration registry) { JAXRWriteAttributeHandler writeHandler = new JAXRWriteAttributeHandler(config); registry.registerReadWriteAttribute(CONNECTION_FACTORY_ATTRIBUTE, null, writeHandler); registry.registerReadWriteAttribute(CONNECTION_FACTORY_IMPL_ATTRIBUTE, null, writeHandler); }
@Override protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, Void handback) throws OperationFailedException { applyUpdateToConfig(config, attributeName, valueToRestore); }
@Override protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { for (AttributeDefinition attr : JAXRSubsystemRootResource.ATTRIBUTES) { if (operation.hasDefined(attr.getName())) { attr.validateAndSet(operation, model); JAXRWriteAttributeHandler.applyUpdateToConfig(config, attr.getName(), operation.get(attr.getName())); } } }