Search in sources :

Example 51 with ResourceDescriptor

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

the class SingletonResourceDefinition 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()).addAttributes(Attribute.class).addCapabilities(Capability.class);
    ResourceServiceHandler handler = new SingletonServiceHandler();
    new DeploymentChainContributingResourceRegistration(descriptor, handler, this).register(registration);
    new SingletonPolicyResourceDefinition().register(registration);
}
Also used : ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) DeploymentChainContributingResourceRegistration(org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 52 with ResourceDescriptor

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

the class TableResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(this.prefixAttribute).addAttributes(Attribute.class).addAttributes(ColumnAttribute.class).addAttributeTranslation(DeprecatedAttribute.BATCH_SIZE, BATCH_SIZE_TRANSLATION);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(this);
    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.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 53 with ResourceDescriptor

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

the class ChannelResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ServiceValueExecutorRegistry<JChannel> executors = new ServiceValueExecutorRegistry<>();
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addCapabilities(Capability.class).addCapabilities(CLUSTERING_CAPABILITIES.values()).addAlias(DeprecatedAttribute.STATS_ENABLED, Attribute.STATISTICS_ENABLED).setAddOperationTransformation(new AddOperationTransformation()).addRuntimeResourceRegistration(new ChannelRuntimeResourceRegistration(executors));
    ResourceServiceHandler handler = new ChannelServiceHandler(executors);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        new MetricHandler<>(new ChannelMetricExecutor(executors), ChannelMetric.class).register(registration);
    }
    new ForkResourceDefinition(executors).register(registration);
    return registration;
}
Also used : JChannel(org.jgroups.JChannel) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ServiceValueExecutorRegistry(org.jboss.as.clustering.controller.ServiceValueExecutorRegistry) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 54 with ResourceDescriptor

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

the class AbstractProtocolResourceDefinition method register.

@SuppressWarnings("deprecation")
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addAttributes(Attribute.class).addExtraParameters(DeprecatedAttribute.class);
    new RestartParentResourceRegistration(this.parentServiceConfiguratorFactory, descriptor, this.handler).register(registration);
    if (registration.getPathAddress().getLastElement().isWildcard()) {
        new PropertyResourceDefinition().register(registration);
    }
    return registration;
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) RestartParentResourceRegistration(org.jboss.as.clustering.controller.RestartParentResourceRegistration) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 55 with ResourceDescriptor

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

the class AffinityResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver()));
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(this.factory);
    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.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)61 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)41 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)38 ManagementResourceRegistration (org.jboss.as.clustering.controller.ManagementResourceRegistration)31 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)27 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)26 ReloadRequiredResourceRegistration (org.jboss.as.clustering.controller.ReloadRequiredResourceRegistration)10 SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)9 DeploymentChainContributingResourceRegistration (org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration)5 ServiceValueExecutorRegistry (org.jboss.as.clustering.controller.ServiceValueExecutorRegistry)5 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)5 OperationContext (org.jboss.as.controller.OperationContext)5 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)5 ModelNode (org.jboss.dmr.ModelNode)5 RestartParentResourceRegistration (org.jboss.as.clustering.controller.RestartParentResourceRegistration)4 OperationFailedException (org.jboss.as.controller.OperationFailedException)4 PathElement (org.jboss.as.controller.PathElement)4 EnumSet (java.util.EnumSet)3 Capability (org.jboss.as.clustering.controller.Capability)3 ListAttributeTranslation (org.jboss.as.clustering.controller.ListAttributeTranslation)3