当前位置: 首页>>代码示例>>Java>>正文


Java ManagementResourceRegistration.getSubModel方法代码示例

本文整理汇总了Java中org.jboss.as.controller.registry.ManagementResourceRegistration.getSubModel方法的典型用法代码示例。如果您正苦于以下问题:Java ManagementResourceRegistration.getSubModel方法的具体用法?Java ManagementResourceRegistration.getSubModel怎么用?Java ManagementResourceRegistration.getSubModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.as.controller.registry.ManagementResourceRegistration的用法示例。


在下文中一共展示了ManagementResourceRegistration.getSubModel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerRunningServer

import org.jboss.as.controller.registry.ManagementResourceRegistration; //导入方法依赖的package包/类
@Override
public void registerRunningServer(final ProxyController serverControllerClient) {
    PathAddress pa = serverControllerClient.getProxyNodeAddress();
    PathElement pe = pa.getElement(1);
    if (modelNodeRegistration.getProxyController(pa) != null) {
        throw HostControllerLogger.ROOT_LOGGER.serverNameAlreadyRegistered(pe.getValue());
    }
    ROOT_LOGGER.registeringServer(pe.getValue());
    // Register the proxy
    final ManagementResourceRegistration hostRegistration = modelNodeRegistration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(HOST, hostControllerInfo.getLocalHostName())));
    hostRegistration.registerProxyController(pe, serverControllerClient);
    // Register local operation overrides
    final ManagementResourceRegistration serverRegistration = hostRegistration.getSubModel(PathAddress.EMPTY_ADDRESS.append(pe));
    ServerConfigResourceDefinition.registerServerLifecycleOperations(serverRegistration, serverInventory);
    serverProxies.put(pe.getValue(), serverControllerClient);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:17,代码来源:DomainModelControllerService.java

示例2: getExtensionContext

import org.jboss.as.controller.registry.ManagementResourceRegistration; //导入方法依赖的package包/类
/**
 * Gets an {@link ExtensionContext} for use when handling an {@code add} operation for
 * a resource representing an {@link org.jboss.as.controller.Extension}.
 *
 * @param moduleName the name of the extension's module. Cannot be {@code null}
 * @param rootRegistration the root management resource registration
 * @param extensionRegistryType the type of registry we are working on, which has an effect on things like whether extensions get registered etc.
 *
 * @return  the {@link ExtensionContext}.  Will not return {@code null}
 */
public ExtensionContext getExtensionContext(final String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType) {
    // Can't use processType.isServer() to determine where to look for profile reg because a lot of test infrastructure
    // doesn't add the profile mrr even in HC-based tests
    ManagementResourceRegistration profileRegistration = rootRegistration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(PROFILE)));
    if (profileRegistration == null) {
        profileRegistration = rootRegistration;
    }
    ManagementResourceRegistration deploymentsRegistration = processType.isServer() ? rootRegistration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(DEPLOYMENT))) : null;

    // Hack to restrict extra data to specified extension(s)
    boolean allowSupplement = legallySupplemented.contains(moduleName);
    ManagedAuditLogger al = allowSupplement ? auditLogger : null;
    return new ExtensionContextImpl(moduleName, profileRegistration, deploymentsRegistration, pathManager, extensionRegistryType, al);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:25,代码来源:ExtensionRegistry.java

示例3: validate

import org.jboss.as.controller.registry.ManagementResourceRegistration; //导入方法依赖的package包/类
private static void validate(ManagementResourceRegistration orig, ManagementResourceRegistration loaded) {
    Assert.assertEquals(orig.getChildAddresses(PathAddress.EMPTY_ADDRESS).size(), loaded.getChildAddresses(PathAddress.EMPTY_ADDRESS).size());

    Assert.assertEquals(orig.getAttributeNames(PathAddress.EMPTY_ADDRESS).size(), loaded.getAttributeNames(PathAddress.EMPTY_ADDRESS).size());
    for (String name : orig.getAttributeNames(PathAddress.EMPTY_ADDRESS)) {
        AttributeDefinition attr1 = orig.getAttributeAccess(PathAddress.EMPTY_ADDRESS, name).getAttributeDefinition();
        AttributeDefinition attr2 = loaded.getAttributeAccess(PathAddress.EMPTY_ADDRESS, name).getAttributeDefinition();
        Assert.assertEquals(1d, SimilarityIndex.compareAttributes(attr1, attr2), 0.0d);
    }
    for (PathElement pe : orig.getChildAddresses(PathAddress.EMPTY_ADDRESS)) {
        ManagementResourceRegistration origSub = orig.getSubModel(PathAddress.pathAddress(pe));
        ManagementResourceRegistration loadedSub = loaded.getSubModel(PathAddress.pathAddress(pe));
        validate(origSub, loadedSub);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:16,代码来源:ModelDescriptionTestCase.java

示例4: initializePathsModel

import org.jboss.as.controller.registry.ManagementResourceRegistration; //导入方法依赖的package包/类
/**
 * Initializes the interface, socket binding group and socket binding part of the model
 *
 * @param rootResource the root model resource
 * @param rootRegistration the root model registry
 */
protected void initializePathsModel(Resource rootResource, ManagementResourceRegistration rootRegistration) {
    if (paths.size() == 0) {
        return;
    }
    rootResource.getModel().get(PATH);
    PathResourceDefinition def = PathResourceDefinition.createSpecified(pathManager);
    if (rootRegistration.getSubModel(PathAddress.pathAddress(def.getPathElement())) != null) {
        //Older versions of core model tests seem to register this resource, while in newer it does not get registered,
        //so let's remove it here if it exists already
        rootRegistration.unregisterSubModel(def.getPathElement());
    }
    rootRegistration.registerSubModel(def);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:20,代码来源:ControllerInitializer.java

示例5: getResourceRegistrationForUpdate

import org.jboss.as.controller.registry.ManagementResourceRegistration; //导入方法依赖的package包/类
@Override
public ManagementResourceRegistration getResourceRegistrationForUpdate() {
    acquireControllerLock();
    ManagementResourceRegistration parent = primaryContext.getResourceRegistrationForUpdate();
    return  parent.getSubModel(activeStep.address);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:7,代码来源:ParallelBootOperationContext.java


注:本文中的org.jboss.as.controller.registry.ManagementResourceRegistration.getSubModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。