Search in sources :

Example 6 with SimpleResourceRegistration

use of org.jboss.as.clustering.controller.SimpleResourceRegistration in project wildfly by wildfly.

the class BackupsResourceDefinition method register.

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

Example 7 with SimpleResourceRegistration

use of org.jboss.as.clustering.controller.SimpleResourceRegistration in project wildfly by wildfly.

the class BinaryTableResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(TableResourceDefinition.Attribute.class).addAttributes(TableResourceDefinition.ColumnAttribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new BinaryTableBuilder(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 8 with SimpleResourceRegistration

use of org.jboss.as.clustering.controller.SimpleResourceRegistration 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 9 with SimpleResourceRegistration

use of org.jboss.as.clustering.controller.SimpleResourceRegistration 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 10 with SimpleResourceRegistration

use of org.jboss.as.clustering.controller.SimpleResourceRegistration 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)

Aggregations

ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)26 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)26 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)25 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)23 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)15 SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)9 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)4 PathElement (org.jboss.as.controller.PathElement)4 EnumMap (java.util.EnumMap)3 EnumSet (java.util.EnumSet)3 Map (java.util.Map)3 AttributeDefinition (org.jboss.as.controller.AttributeDefinition)3 OperationContext (org.jboss.as.controller.OperationContext)3 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)3 ModelNode (org.jboss.dmr.ModelNode)3 CapabilityProvider (org.jboss.as.clustering.controller.CapabilityProvider)2 CapabilityReference (org.jboss.as.clustering.controller.CapabilityReference)2 ChildResourceDefinition (org.jboss.as.clustering.controller.ChildResourceDefinition)2 CapabilityReferenceRecorder (org.jboss.as.controller.CapabilityReferenceRecorder)2 ModelVersion (org.jboss.as.controller.ModelVersion)2