Search in sources :

Example 11 with ManagementResourceRegistration

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

the class StateTransferResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addIgnoredAttributes(DeprecatedAttribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(StateTransferServiceConfigurator::new);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    return 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.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 12 with ManagementResourceRegistration

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

the class StoreResourceDefinition method register.

@SuppressWarnings("deprecation")
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    if (this.legacyPath != null) {
        parent.registerAlias(this.legacyPath, new SimpleAliasEntry(registration));
    }
    ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addAttributes(Attribute.class).addIgnoredAttributes(DeprecatedAttribute.class).addCapabilities(Capability.class).addRequiredSingletonChildren(StoreWriteThroughResourceDefinition.PATH);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(this);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        for (DeprecatedMetric metric : EnumSet.allOf(DeprecatedMetric.class)) {
            metric.register(registration);
        }
    }
    new StoreWriteBehindResourceDefinition().register(registration);
    new StoreWriteThroughResourceDefinition().register(registration);
    new StorePropertyResourceDefinition().register(registration);
    return registration;
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) RuntimeCapability(org.jboss.as.controller.capability.RuntimeCapability) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 13 with ManagementResourceRegistration

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

the class StoreWriteBehindResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addIgnoredAttributes(DeprecatedAttribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(StoreWriteBehindServiceConfigurator::new);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    return 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.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 14 with ManagementResourceRegistration

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

the class StoreWriteThroughResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(StoreWriteThroughServiceConfigurator::new);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    return registration;
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 15 with ManagementResourceRegistration

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

the class MemoryResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addAttributes(Attribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(this);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        for (EvictionMetric metric : EnumSet.allOf(EvictionMetric.class)) {
            metric.register(registration);
        }
    }
    return registration;
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

ManagementResourceRegistration (org.jboss.as.clustering.controller.ManagementResourceRegistration)41 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)31 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)25 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)23 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)13 SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)10 ServiceValueExecutorRegistry (org.jboss.as.clustering.controller.ServiceValueExecutorRegistry)5 OperationContext (org.jboss.as.controller.OperationContext)5 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)5 PathAddress (org.jboss.as.controller.PathAddress)5 ModelNode (org.jboss.dmr.ModelNode)5 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)4 PathElement (org.jboss.as.controller.PathElement)4 EnumSet (java.util.EnumSet)3 Capability (org.jboss.as.clustering.controller.Capability)3 DeploymentChainContributingResourceRegistration (org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration)3 ListAttributeTranslation (org.jboss.as.clustering.controller.ListAttributeTranslation)3 AttributeDefinition (org.jboss.as.controller.AttributeDefinition)3 OperationFailedException (org.jboss.as.controller.OperationFailedException)3 EnumMap (java.util.EnumMap)2