org.jboss.as.clustering.controller.ParentResourceServiceHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wildfly-clustering-common Show documentation
Show all versions of wildfly-clustering-common Show documentation
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.
/*
* 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)));
}
}