Search in sources :

Example 16 with SimpleResourceServiceHandler

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

the class BackupForResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    parentRegistration.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new BackupForBuilder(address.getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)16 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)16 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)16 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)16 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)15 SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)7 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)1 RuntimeCapability (org.jboss.as.controller.capability.RuntimeCapability)1