use of org.jboss.as.clustering.controller.ManagementResourceRegistration in project wildfly by wildfly.
the class SecurityResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addCapabilities(Capability.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler(this);
new SimpleResourceRegistration(descriptor, handler).register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ManagementResourceRegistration in project wildfly by wildfly.
the class NoNearCacheResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
new SimpleResourceRegistration(descriptor, null).register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ManagementResourceRegistration in project wildfly by wildfly.
the class JGroupsSubsystemResourceDefinition method register.
@Override
public void register(SubsystemRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubsystemModel(this);
new DefaultSubsystemDescribeHandler().register(registration);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addCapabilities(model -> model.hasDefined(Attribute.DEFAULT_CHANNEL.getName()), CAPABILITIES.values()).addCapabilities(model -> model.hasDefined(Attribute.DEFAULT_CHANNEL.getName()), CLUSTERING_CAPABILITIES.values()).setAddOperationTransformation(new AddOperationTransformer());
ResourceServiceHandler handler = new JGroupsSubsystemServiceHandler();
new SimpleResourceRegistration(descriptor, handler).register(registration);
new ChannelResourceDefinition().register(registration);
new StackResourceDefinition().register(registration);
}
use of org.jboss.as.clustering.controller.ManagementResourceRegistration in project wildfly by wildfly.
the class SingletonDeploymentResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
new MetricHandler<>(new SingletonDeploymentMetricExecutor(this.executors), SingletonMetric.class).register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ManagementResourceRegistration in project wildfly by wildfly.
the class SingletonPolicyResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addCapabilities(Capability.class).addRequiredSingletonChildren(SimpleElectionPolicyResourceDefinition.PATH).setResourceTransformation(SingletonPolicyResource::new);
ServiceValueExecutorRegistry<Singleton> executors = new ServiceValueExecutorRegistry<>();
ResourceServiceHandler handler = new SingletonPolicyServiceHandler(executors);
new SimpleResourceRegistration(descriptor, handler).register(registration);
new RandomElectionPolicyResourceDefinition().register(registration);
new SimpleElectionPolicyResourceDefinition().register(registration);
if (registration.isRuntimeOnlyRegistrationValid()) {
new SingletonDeploymentResourceDefinition(executors).register(registration);
new SingletonServiceResourceDefinition(executors).register(registration);
}
return registration;
}
Aggregations