org.jboss.as.clustering.controller.ContextualResourceRegistration 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 java.util.Optional;
import org.jboss.as.controller.services.path.PathManager;
/**
* @author Paul Ferraro
*/
public class ContextualResourceRegistration extends DecoratingResourceRegistration implements ManagementResourceRegistration {
private final ManagementRegistrationContext context;
public ContextualResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration 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();
}
}