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);
}
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;
}
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;
}
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;
}
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;
}
Aggregations