Java Code Examples for org.jboss.as.controller.registry.ManagementResourceRegistration#registerReadWriteAttribute()

The following examples show how to use org.jboss.as.controller.registry.ManagementResourceRegistration#registerReadWriteAttribute() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GmlcMbeanPropertyDefinition.java    From gmlc with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void registerAttributes(final ManagementResourceRegistration properties) {
  //super.registerAttributes(resourceRegistration);
  properties.registerReadOnlyAttribute(NAME_ATTR, null);
  for (SimpleAttributeDefinition def : PROPERTY_ATTRIBUTES) {
    properties.registerReadWriteAttribute(def, null, new ReloadRequiredWriteAttributeHandler(def));
  }
}
 
Example 2
Source File: ServiceProviderDefinition.java    From keycloak with Apache License 2.0 5 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    super.registerAttributes(resourceRegistration);

    final OperationStepHandler writeHandler = new ReloadRequiredWriteAttributeHandler(ALL_ATTRIBUTES);
    for (AttributeDefinition attribute : ALL_ATTRIBUTES) {
        resourceRegistration.registerReadWriteAttribute(attribute, null, writeHandler);
    }
}
 
Example 3
Source File: SslLoopbackResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    OperationStepHandler handler = new ModelOnlyWriteAttributeHandler(ATTRIBUTES);
    for (AttributeDefinition attr : ATTRIBUTES) {
        resourceRegistration.registerReadWriteAttribute(attr, null, handler);
    }
}
 
Example 4
Source File: ModelOnlyResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    OperationStepHandler writeHandler = new ModelOnlyWriteAttributeHandler(attributes);
    for (AttributeDefinition ad : attributes) {
        resourceRegistration.registerReadWriteAttribute(ad, null, writeHandler);
    }
}
 
Example 5
Source File: HostExcludeResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    OperationStepHandler handler = new WriteHandler(domainHostExcludeRegistry, attributes);
    for (AttributeDefinition ad : attributes) {
        resourceRegistration.registerReadWriteAttribute(ad, null, handler);
    }
}
 
Example 6
Source File: ServerGroupResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    OperationStepHandler referenceValidationHandler = createRestartRequiredHandler();
    for (AttributeDefinition attr : ServerGroupResourceDefinition.ADD_ATTRIBUTES) {
        if (attr.getName().equals(MANAGEMENT_SUBSYSTEM_ENDPOINT.getName())) {
            resourceRegistration.registerReadOnlyAttribute(MANAGEMENT_SUBSYSTEM_ENDPOINT, null);
        } else if (attr.getName().equals(PROFILE.getName()) || attr.getName().equals(SOCKET_BINDING_GROUP.getName())) {
            resourceRegistration.registerReadWriteAttribute(attr, null, referenceValidationHandler);
        } else {
            resourceRegistration.registerReadWriteAttribute(attr, null, new ModelOnlyWriteAttributeHandler(attr));
        }
    }
}
 
Example 7
Source File: RemotingEndpointResource.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    OperationStepHandler toParentHandler = new ToParentHandler();
    for (AttributeDefinition ad : ATTRIBUTES.values()) {
        resourceRegistration.registerReadWriteAttribute(ad, toParentHandler, toParentHandler);
    }
}
 
Example 8
Source File: JvmResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    AttributeDefinition[] defs = JvmAttributes.getAttributes(server);
    OperationStepHandler handler = new ModelOnlyWriteAttributeHandler(defs);
    for (AttributeDefinition attr : JvmAttributes.getAttributes(server)) {
        resourceRegistration.registerReadWriteAttribute(attr, null, handler);
    }
}
 
Example 9
Source File: ManagedDMRContentResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    resourceRegistration.registerReadOnlyAttribute(HASH, null);
    resourceRegistration.registerReadWriteAttribute(contentDefinition, null, new ManagedDMRContentWriteAttributeHandler(contentDefinition));
}
 
Example 10
Source File: StructuredFormatterResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(final ManagementResourceRegistration resourceRegistration) {
    for (AttributeDefinition attribute : attributes) {
        resourceRegistration.registerReadWriteAttribute(attribute, null, writeHandler);
    }
}
 
Example 11
Source File: SyslogHandlerResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(final ManagementResourceRegistration resourceRegistration) {
    for (AttributeDefinition def : ATTRIBUTES) {
        resourceRegistration.registerReadWriteAttribute(def, null, WRITE_HANDLER);
    }
}
 
Example 12
Source File: OrderedChildResourceTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    resourceRegistration.registerReadWriteAttribute(ATTR, null, new ModelOnlyWriteAttributeHandler(ATTR));
}
 
Example 13
Source File: LocalOutboundConnectionResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    super.registerAttributes(resourceRegistration);
    resourceRegistration.registerReadWriteAttribute(OUTBOUND_SOCKET_BINDING_REF, null, LocalOutboundConnectionWriteHandler.INSTANCE);
}
 
Example 14
Source File: ChildResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    super.registerAttributes(resourceRegistration);
    resourceRegistration.registerReadWriteAttribute(CHILD_ATTRIBUTE, null, new ReloadRequiredWriteAttributeHandler(CHILD_ATTRIBUTE));
}
 
Example 15
Source File: LdapConnectionPropertyResourceDefinition.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    resourceRegistration.registerReadWriteAttribute(VALUE, null, new ValueWriteHandler());
}
 
Example 16
Source File: ReadResourceDescriptionAccessConstraintDefinitionTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    resourceRegistration.registerReadWriteAttribute(STANDARD_ATTR, null, new TestWriteAttributeHandler(STANDARD_ATTR));
}
 
Example 17
Source File: OldExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    resourceRegistration.registerReadWriteAttribute(VALUE, null, new ModelOnlyWriteAttributeHandler());
}
 
Example 18
Source File: PropertyResource.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    resourceRegistration.registerReadWriteAttribute(VALUE, null, new RestartConnectorWriteAttributeHandler(parent, VALUE));
}
 
Example 19
Source File: ReadResourceDescriptionAccessConstraintDefinitionTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    resourceRegistration.registerReadWriteAttribute(STANDARD_ATTR, null, new TestWriteAttributeHandler(STANDARD_ATTR));
    resourceRegistration.registerReadWriteAttribute(SENSITIVE_ATTR, null, new TestWriteAttributeHandler(SENSITIVE_ATTR));
}
 
Example 20
Source File: BlockerExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
    super.registerAttributes(resourceRegistration);
    resourceRegistration.registerReadWriteAttribute(FOO, null, new ModelOnlyWriteAttributeHandler(FOO));
}