Search in sources :

Example 1 with RestartParentResourceRegistration

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

the class RemoteClusterResourceDefinition 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);
    new RestartParentResourceRegistration(this.serviceConfiguratorFactory, descriptor).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        new OperationHandler<>(new RemoteClusterOperationExecutor(this.executors), RemoteClusterOperation.class).register(registration);
    }
    return registration;
}
Also used : ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) RestartParentResourceRegistration(org.jboss.as.clustering.controller.RestartParentResourceRegistration) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 2 with RestartParentResourceRegistration

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

the class BackupResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(TakeOfflineAttribute.class);
    new RestartParentResourceRegistration(this.parentServiceConfiguratorFactory, descriptor).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        new OperationHandler<>(new BackupOperationExecutor(this.executors), BackupOperation.class).register(registration);
    }
    return registration;
}
Also used : ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) RestartParentResourceRegistration(org.jboss.as.clustering.controller.RestartParentResourceRegistration) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 3 with RestartParentResourceRegistration

use of org.jboss.as.clustering.controller.RestartParentResourceRegistration 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;
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) RestartParentResourceRegistration(org.jboss.as.clustering.controller.RestartParentResourceRegistration) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 4 with RestartParentResourceRegistration

use of org.jboss.as.clustering.controller.RestartParentResourceRegistration 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)

Aggregations

ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)4 RestartParentResourceRegistration (org.jboss.as.clustering.controller.RestartParentResourceRegistration)4 ManagementResourceRegistration (org.jboss.as.clustering.controller.ManagementResourceRegistration)2 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)2 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)1 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)1