Search in sources :

Example 1 with ResourceServiceConfiguratorFactory

use of org.jboss.as.clustering.controller.ResourceServiceConfiguratorFactory 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 2 with ResourceServiceConfiguratorFactory

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

the class ForkResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addCapabilities(Capability.class).addCapabilities(CLUSTERING_CAPABILITIES.values());
    ResourceServiceConfiguratorFactory serviceConfiguratorFactory = new ForkChannelFactoryServiceConfiguratorFactory();
    ResourceServiceHandler handler = new ForkServiceHandler(serviceConfiguratorFactory);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    new ProtocolRegistration(serviceConfiguratorFactory, new ForkProtocolRuntimeResourceRegistration(this.executors)).register(registration);
    return registration;
}
Also used : SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) UnaryRequirementCapability(org.jboss.as.clustering.controller.UnaryRequirementCapability) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ResourceServiceConfiguratorFactory(org.jboss.as.clustering.controller.ResourceServiceConfiguratorFactory) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)2 ResourceServiceConfiguratorFactory (org.jboss.as.clustering.controller.ResourceServiceConfiguratorFactory)2 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)2 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)2 ManagementResourceRegistration (org.jboss.as.clustering.controller.ManagementResourceRegistration)1 ParentResourceServiceHandler (org.jboss.as.clustering.controller.ParentResourceServiceHandler)1 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)1 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)1