Search in sources :

Example 6 with ManagementResourceRegistration

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

the class InfinispanSubsystemResourceDefinition method register.

@Override
public void register(SubsystemRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubsystemModel(this);
    registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addCapabilities(LOCAL_CLUSTERING_CAPABILITIES.values()).addCapabilities(CLUSTERING_CAPABILITIES.values());
    ResourceServiceHandler handler = new InfinispanSubsystemServiceHandler();
    new DeploymentChainContributingResourceRegistration(descriptor, handler, this).register(registration);
    new CacheContainerResourceDefinition().register(registration);
    new RemoteCacheContainerResourceDefinition().register(registration);
}
Also used : RemoteCacheContainerResourceDefinition(org.jboss.as.clustering.infinispan.subsystem.remote.RemoteCacheContainerResourceDefinition) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) DeploymentChainContributingResourceRegistration(org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) RemoteCacheContainerResourceDefinition(org.jboss.as.clustering.infinispan.subsystem.remote.RemoteCacheContainerResourceDefinition) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 7 with ManagementResourceRegistration

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

the class ExpirationResourceDefinition 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);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(ExpirationServiceConfigurator::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 8 with ManagementResourceRegistration

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

the class HeapMemoryResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = super.register(parent);
    parent.registerAlias(OBJECT_PATH, new SimpleAliasEntry(registration));
    parent.registerAlias(EVICTION_PATH, new SimpleAliasEntry(registration));
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    return registration;
}
Also used : SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration)

Example 9 with ManagementResourceRegistration

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

the class BackupsResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
    ResourceServiceConfiguratorFactory serviceConfiguratorFactory = BackupsServiceConfigurator::new;
    ResourceServiceHandler handler = new ParentResourceServiceHandler(serviceConfiguratorFactory);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    new BackupResourceDefinition(serviceConfiguratorFactory, this.executors).register(registration);
    return registration;
}
Also used : SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) ResourceServiceConfiguratorFactory(org.jboss.as.clustering.controller.ResourceServiceConfiguratorFactory) 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 10 with ManagementResourceRegistration

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

the class SharedStateCacheResourceDefinition method register.

@SuppressWarnings("deprecation")
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = super.register(parent);
    new PartitionHandlingResourceDefinition().register(registration);
    new StateTransferResourceDefinition().register(registration);
    new BackupsResourceDefinition(this.executors).register(registration);
    new BackupForResourceDefinition().register(registration);
    return registration;
}
Also used : ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration)

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