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

org.jboss.as.clustering.controller.ContextualSubsystemRegistration 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.

The newest version!
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.jboss.as.clustering.controller;

import java.util.Optional;

import org.jboss.as.controller.ExtensionContext;
import org.jboss.as.controller.services.path.PathManager;

/**
 * @author Paul Ferraro
 */
public class ContextualSubsystemRegistration extends DecoratingSubsystemRegistration implements SubsystemRegistration {

    private final ManagementRegistrationContext context;

    public ContextualSubsystemRegistration(org.jboss.as.controller.SubsystemRegistration registration, ExtensionContext context) {
        this(registration, new ExtensionRegistrationContext(context));
    }

    public ContextualSubsystemRegistration(org.jboss.as.controller.SubsystemRegistration registration, ManagementRegistrationContext context) {
        super(registration, r -> new ContextualResourceRegistration(r, context));
        this.context = context;
    }

    @Override
    public boolean isRuntimeOnlyRegistrationValid() {
        return this.context.isRuntimeOnlyRegistrationValid();
    }

    @Override
    public Optional getPathManager() {
        return this.context.getPathManager();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy