All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.as.clustering.controller.ParentResourceServiceHandler Maven / Gradle / Ivy

Go to download

The code in this module is not explicitly related to clustering, but rather contains resuable code used by clustering modules and any modules that integrate with clustering.

There is a newer version: 34.0.0.Final
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.jboss.as.clustering.controller;

import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.registry.Resource;
import org.jboss.dmr.ModelNode;

/**
 * A {@link SimpleResourceServiceHandler} that uses a recursively read model, to include child resources.
 * @author Paul Ferraro
 */
public class ParentResourceServiceHandler extends SimpleResourceServiceHandler {

    public ParentResourceServiceHandler(ResourceServiceConfiguratorFactory factory) {
        super(factory);
    }

    @Override
    public void installServices(OperationContext context, ModelNode model) throws OperationFailedException {
        super.installServices(context, Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS)));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy