Search in sources :

Example 26 with ManagementResourceRegistration

use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.

the class StateTransferResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    parentRegistration.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(DeprecatedAttribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new StateTransferBuilder(address.getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 27 with ManagementResourceRegistration

use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.

the class StoreResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    if (this.legacyPath != null) {
        parentRegistration.registerAlias(this.legacyPath, new SimpleAliasEntry(registration));
    }
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
    this.descriptorConfigurator.accept(descriptor);
    new SimpleResourceRegistration(descriptor, this.handler).register(registration);
    this.registrationConfigurator.accept(registration);
}
Also used : SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 28 with ManagementResourceRegistration

use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.

the class StoreWriteBehindResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    parentRegistration.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(DeprecatedAttribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new StoreWriteBehindBuilder(address.getParent().getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 29 with ManagementResourceRegistration

use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.

the class StoreWriteThroughResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new StoreWriteThroughBuilder(address.getParent().getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 30 with ManagementResourceRegistration

use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.

the class JGroupsTransportResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    parentRegistration.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(ExecutorAttribute.class).addAttributes(DeprecatedAttribute.class).addCapabilities(Capability.class).addCapabilities(CLUSTERING_CAPABILITIES.values());
    ResourceServiceHandler handler = new JGroupsTransportServiceHandler();
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) RuntimeCapability(org.jboss.as.controller.capability.RuntimeCapability) UnaryRequirementCapability(org.jboss.as.clustering.controller.UnaryRequirementCapability) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)79 SubsystemRegistration (org.jboss.as.controller.SubsystemRegistration)32 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)30 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)26 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)25 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)16 PathElement (org.jboss.as.controller.PathElement)12 SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)9 PathAddress (org.jboss.as.controller.PathAddress)9 ModelNode (org.jboss.dmr.ModelNode)8 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)7 Resource (org.jboss.as.controller.registry.Resource)7 Map (java.util.Map)6 Locale (java.util.Locale)5 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)5 OperationContext (org.jboss.as.controller.OperationContext)5 EnumMap (java.util.EnumMap)4 EnumSet (java.util.EnumSet)4 AttributeDefinition (org.jboss.as.controller.AttributeDefinition)4 SimpleAttributeDefinitionBuilder (org.jboss.as.controller.SimpleAttributeDefinitionBuilder)4