use of org.jboss.as.clustering.controller.ResourceDescriptor 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.ResourceDescriptor 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.ResourceDescriptor in project wildfly by wildfly.
the class RemoteSiteResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(DeprecatedAttribute.class).addCapabilities(Capability.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler(RemoteSiteConfigurationServiceConfigurator::new);
new RestartParentResourceRegistration(this.parentServiceConfiguratorFactory, descriptor, handler).register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor 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;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class ElectionPolicyResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addAttributes(ElectionPolicyResourceDefinition.Attribute.class).addCapabilities(ElectionPolicyResourceDefinition.Capability.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler(this.serviceConfiguratorFactory);
new SimpleResourceRegistration(descriptor, handler).register(registration);
return registration;
}
Aggregations