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


Java ExtensibleConfigurationPersister类代码示例

本文整理汇总了Java中org.jboss.as.controller.persistence.ExtensibleConfigurationPersister的典型用法代码示例。如果您正苦于以下问题:Java ExtensibleConfigurationPersister类的具体用法?Java ExtensibleConfigurationPersister怎么用?Java ExtensibleConfigurationPersister使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExtensibleConfigurationPersister类属于org.jboss.as.controller.persistence包,在下文中一共展示了ExtensibleConfigurationPersister类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initCoreModel

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
@Override
public void initCoreModel(Resource rootResource, ManagementResourceRegistration rootRegistration, Resource modelControllerResource) {
    VersionModelInitializer.registerRootResource(rootResource, null);
    final HostControllerEnvironment env = createHostControllerEnvironment();
    final LocalHostControllerInfoImpl info = createLocalHostControllerInfo(env);
    final IgnoredDomainResourceRegistry ignoredRegistry = new IgnoredDomainResourceRegistry(info);
    final ExtensibleConfigurationPersister persister = new NullConfigurationPersister();
    final HostFileRepository hostFileRepository = createHostFileRepository();

    DomainRootDefinition domainDefinition = new DomainRootDefinition(env, persister, injectedContentRepository.getValue(),
            hostFileRepository, true, info, extensionRegistry, null, pathManagerService, authorizer);
    domainDefinition.initialize(rootRegistration);
    rootResourceDefinition.setDelegate(domainDefinition);

    HostModelUtil.createRootRegistry(
            rootRegistration,
            env, ignoredRegistry,
            new HostModelRegistrar() {

                @Override
                public void registerHostModel(String hostName, ManagementResourceRegistration root) {
                }
            },processType, authorizer, modelControllerResource);

    CoreManagementResourceDefinition.registerDomainResource(rootResource, null);
}
 
开发者ID:wildfly,项目名称:wildfly-legacy-test,代码行数:27,代码来源:TestModelControllerService7_5_0.java

示例2: createHostXmlConfigurationPersister

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public static ExtensibleConfigurationPersister createHostXmlConfigurationPersister(final ConfigurationFile file, final HostControllerEnvironment environment,
                                                                                   final ExecutorService executorService, final ExtensionRegistry hostExtensionRegistry,
                                                                                   final LocalHostControllerInfo localHostControllerInfo) {
    String defaultHostname = localHostControllerInfo.getLocalHostName();
    if (environment.getRunningModeControl().isReloaded()) {
        if (environment.getRunningModeControl().getReloadHostName() != null) {
            defaultHostname = environment.getRunningModeControl().getReloadHostName();
        }
    }
    HostXml hostXml = new HostXml(defaultHostname, environment.getRunningModeControl().getRunningMode(),
            environment.isUseCachedDc(), Module.getBootModuleLoader(), executorService, hostExtensionRegistry);
    BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "host"), hostXml, hostXml, false);
    for (Namespace namespace : Namespace.domainValues()) {
        if (!namespace.equals(Namespace.CURRENT)) {
            persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "host"), hostXml);
        }
    }
    hostExtensionRegistry.setWriterRegistry(persister);
    return persister;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:21,代码来源:ConfigurationPersisterFactory.java

示例3: createDomainXmlConfigurationPersister

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister(final ConfigurationFile file, ExecutorService executorService, ExtensionRegistry extensionRegistry, final HostControllerEnvironment environment) {
    DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry);

    boolean suppressLoad = false;
    ConfigurationFile.InteractionPolicy policy = file.getInteractionPolicy();
    final boolean isReloaded = environment.getRunningModeControl().isReloaded();

    if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW && (file.getBootFile().exists() && file.getBootFile().length() != 0))) {
        throw HostControllerLogger.ROOT_LOGGER.cannotOverwriteDomainXmlWithEmpty(file.getBootFile().getName());
    }

    if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW || policy == ConfigurationFile.InteractionPolicy.DISCARD)) {
        suppressLoad = true;
    }

    BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "domain"), domainXml, domainXml, suppressLoad);
    for (Namespace namespace : Namespace.domainValues()) {
        if (!namespace.equals(Namespace.CURRENT)) {
            persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "domain"), domainXml);
        }
    }
    extensionRegistry.setWriterRegistry(persister);
    return persister;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:25,代码来源:ConfigurationPersisterFactory.java

示例4: initCoreModel

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
@Override
public void initCoreModel(Resource rootResource, ManagementResourceRegistration rootRegistration, Resource modelControllerResource) {
    VersionModelInitializer.registerRootResource(rootResource, null);
    final HostControllerEnvironment env = createHostControllerEnvironment();
    final LocalHostControllerInfoImpl info = createLocalHostControllerInfo(env);
    final IgnoredDomainResourceRegistry ignoredRegistry = new IgnoredDomainResourceRegistry(info);
    final ExtensibleConfigurationPersister persister = new NullConfigurationPersister();
    final HostFileRepository hostFileRepository = createHostFileRepository();
    final DomainController domainController = createDomainController(env, info);
    final DomainHostExcludeRegistry domainHostExcludeRegistry = new DomainHostExcludeRegistry();

    DomainRootDefinition domainDefinition = new DomainRootDefinition(
            domainController,
            env,
            persister,
            injectedContentRepository.getValue(),
            hostFileRepository,
            true,
            info,
            extensionRegistry,
            null,
            pathManagerService,
            authorizer,
            null,
            null,
            domainHostExcludeRegistry,
            getMutableRootResourceRegistrationProvider());
    domainDefinition.initialize(rootRegistration);
    rootResourceDefinition.setDelegate(domainDefinition);

    HostModelUtil.createRootRegistry(
            rootRegistration,
            env, ignoredRegistry,
            (hostName, root) -> {},
            processType,
            authorizer,
            modelControllerResource);
    CoreManagementResourceDefinition.registerDomainResource(rootResource, null);
}
 
开发者ID:wildfly,项目名称:wildfly-legacy-test,代码行数:40,代码来源:TestModelControllerService11_0_0.java

示例5: initCoreModel

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
@Override
public void initCoreModel(Resource rootResource, ManagementResourceRegistration rootRegistration, Resource modelControllerResource) {
    VersionModelInitializer.registerRootResource(rootResource, null);
    final HostControllerEnvironment env = createHostControllerEnvironment();
    final LocalHostControllerInfoImpl info = createLocalHostControllerInfo(env);
    final IgnoredDomainResourceRegistry ignoredRegistry = new IgnoredDomainResourceRegistry(info);
    final ExtensibleConfigurationPersister persister = new NullConfigurationPersister();
    final HostFileRepository hostFileRepository = createHostFileRepository();
    final DomainController domainController = createDomainController(env, info);
    final DomainHostExcludeRegistry domainHostExcludeRegistry = new DomainHostExcludeRegistry();

    DomainRootDefinition domainDefinition = new DomainRootDefinition(
            domainController,
            env,
            persister,
            injectedContentRepository.getValue(),
            hostFileRepository,
            true,
            info,
            extensionRegistry,
            null,
            pathManagerService,
            authorizer,
            null,
            domainHostExcludeRegistry,
            getMutableRootResourceRegistrationProvider());
    domainDefinition.initialize(rootRegistration);
    rootResourceDefinition.setDelegate(domainDefinition);

    HostModelUtil.createRootRegistry(
            rootRegistration,
            env, ignoredRegistry,
            (hostName, root) -> {},
            processType,
            authorizer,
            modelControllerResource);
    CoreManagementResourceDefinition.registerDomainResource(rootResource, null);
}
 
开发者ID:wildfly,项目名称:wildfly-legacy-test,代码行数:39,代码来源:TestModelControllerService10_0_0.java

示例6: initializeMasterDomainRegistry

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public void initializeMasterDomainRegistry(final ManagementResourceRegistration root,
        final ExtensibleConfigurationPersister configurationPersister, final ContentRepository contentRepository,
        final HostFileRepository fileRepository,
        final ExtensionRegistry extensionRegistry, final PathManagerService pathManager) {
    initializeDomainResource(root, configurationPersister, contentRepository, fileRepository, true,
            hostControllerInfo, extensionRegistry, null, pathManager);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:8,代码来源:DomainModelControllerService.java

示例7: initializeSlaveDomainRegistry

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public void initializeSlaveDomainRegistry(final ManagementResourceRegistration root,
        final ExtensibleConfigurationPersister configurationPersister, final ContentRepository contentRepository,
        final HostFileRepository fileRepository, final LocalHostControllerInfo hostControllerInfo,
        final ExtensionRegistry extensionRegistry,
        final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry, final PathManagerService pathManagery) {
    initializeDomainResource(root, configurationPersister, contentRepository, fileRepository, false, hostControllerInfo,
            extensionRegistry, ignoredDomainResourceRegistry, pathManager);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:DomainModelControllerService.java

示例8: initializeDomainResource

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
private void initializeDomainResource(final ManagementResourceRegistration root, final ExtensibleConfigurationPersister configurationPersister,
        final ContentRepository contentRepo, final HostFileRepository fileRepository, final boolean isMaster,
        final LocalHostControllerInfo hostControllerInfo,
        final ExtensionRegistry extensionRegistry, final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry,
        final PathManagerService pathManager) {

    DomainRootDefinition domainRootDefinition = new DomainRootDefinition(this, environment, configurationPersister, contentRepo, fileRepository, isMaster, hostControllerInfo,
            extensionRegistry, ignoredDomainResourceRegistry, pathManager, authorizer, securityIdentitySupplier, this, domainHostExcludeRegistry, getMutableRootResourceRegistrationProvider());
    rootResourceDefinition.setDelegate(domainRootDefinition, root);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:DomainModelControllerService.java

示例9: createRemoteBackupDomainXmlConfigurationPersister

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public static ExtensibleConfigurationPersister createRemoteBackupDomainXmlConfigurationPersister(final File configDir, ExecutorService executorService, ExtensionRegistry extensionRegistry) {
    DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry);
    File bootFile = new File(configDir, CACHED_DOMAIN_XML_BOOTFILE);
    File file = new File(configDir, CACHED_DOMAIN_XML);
    BackupRemoteDomainXmlPersister persister = new BackupRemoteDomainXmlPersister(file, bootFile, new QName(Namespace.CURRENT.getUriString(), "domain"), domainXml, domainXml);
    for (Namespace namespace : Namespace.domainValues()) {
        if (!namespace.equals(Namespace.CURRENT)) {
            persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "domain"), domainXml);
        }
    }
    extensionRegistry.setWriterRegistry(persister);
    return persister;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:14,代码来源:ConfigurationPersisterFactory.java

示例10: DomainRootDefinition

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public DomainRootDefinition(
        final DomainController domainController,
        final HostControllerEnvironment environment,
        final ExtensibleConfigurationPersister configurationPersister, final ContentRepository contentRepo,
        final HostFileRepository fileRepository, final boolean isMaster,
        final LocalHostControllerInfo hostControllerInfo,
        final ExtensionRegistry extensionRegistry, final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry,
        final PathManagerService pathManager,
        final DelegatingConfigurableAuthorizer authorizer,
        final ManagementSecurityIdentitySupplier securityIdentitySupplier,
        final HostRegistrations hostRegistrations,
        final DomainHostExcludeRegistry domainHostExcludeRegistry,
        final MutableRootResourceRegistrationProvider rootResourceRegistrationProvider) {
    super(null, DomainResolver.getResolver(DOMAIN, false));
    this.domainController = domainController;
    this.isMaster = isMaster;
    this.environment = environment;
    this.hostControllerInfo = hostControllerInfo;
    this.configurationPersister = configurationPersister;
    this.contentRepo = contentRepo;
    this.fileRepository = fileRepository;
    this.extensionRegistry = extensionRegistry;
    this.ignoredDomainResourceRegistry = ignoredDomainResourceRegistry;
    this.pathManager = pathManager;
    this.authorizer = authorizer;
    this.securityIdentitySupplier = securityIdentitySupplier;
    this.hostRegistrations = hostRegistrations;
    this.domainHostExcludeRegistry = domainHostExcludeRegistry;
    this.rootResourceRegistrationProvider = rootResourceRegistrationProvider;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:31,代码来源:DomainRootDefinition.java

示例11: setDelegate

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
@Override
public void setDelegate() {
    final ExtensibleConfigurationPersister configurationPersister = new EmptyConfigurationPersister();
    final boolean isMaster = false;
    final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry = new IgnoredDomainResourceRegistry(hostControllerInfo);
    final PathManagerService pathManager = new HostPathManagerService(capabilityRegistry);
    final DelegatingConfigurableAuthorizer authorizer = new DelegatingConfigurableAuthorizer();
    final ManagementSecurityIdentitySupplier securityIdentitySupplier = new ManagementSecurityIdentitySupplier();
    final HostRegistrations hostRegistrations = null;
    final DomainHostExcludeRegistry domainHostExcludeRegistry = new DomainHostExcludeRegistry();
    final MutableRootResourceRegistrationProvider rootResourceRegistrationProvider = new MutableRootResourceRegistrationProvider() {
        @Override
        public ManagementResourceRegistration getRootResourceRegistrationForUpdate(OperationContext context) {
            return managementModel.getRootResourceRegistration();
        }
    };
    DomainRootDefinition domain = new DomainRootDefinition(domainController, hostControllerEnvironment, configurationPersister,
            repository, repository, isMaster, hostControllerInfo, extensionRegistry, ignoredDomainResourceRegistry,
            pathManager, authorizer, securityIdentitySupplier, hostRegistrations, domainHostExcludeRegistry, rootResourceRegistrationProvider);
    getDelegatingResourceDefiniton().setDelegate(domain);

    final String hostName = hostControllerEnvironment.getHostName();
    final HostControllerConfigurationPersister hostControllerConfigurationPersister =
            new HostControllerConfigurationPersister(hostControllerEnvironment,
                    hostControllerInfo, Executors.newCachedThreadPool(), extensionRegistry, extensionRegistry);
    final HostRunningModeControl runningModeControl = new HostRunningModeControl(RunningMode.NORMAL, RestartMode.SERVERS);
    final ServerInventory serverInventory = null;
    final HostFileRepository remoteFileRepository = repository;
    final AbstractVaultReader vaultReader = null;
    final ControlledProcessState processState = null;
    final ManagedAuditLogger auditLogger = null;
    final BootErrorCollector bootErrorCollector = null;
    //Save this for later since setDelegate() gets called before initModel....
    hostResourceDefinition = new HostResourceDefinition(hostName, hostControllerConfigurationPersister,
            hostControllerEnvironment, runningModeControl, repository, hostControllerInfo, serverInventory, remoteFileRepository,
            repository, domainController, extensionRegistry, vaultReader, ignoredDomainResourceRegistry, processState,
            pathManager, authorizer, securityIdentitySupplier, auditLogger, bootErrorCollector);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:39,代码来源:SyncModelServerStateTestCase.java

示例12: getConfigurationPersisterFactory

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
/**
 * Get the factory for the configuration persister to use.
 *
 * @return the configuration persister factory
 */
public synchronized ConfigurationPersisterFactory getConfigurationPersisterFactory() {
    if (configurationPersisterFactory == null) {
        configurationPersisterFactory = new ConfigurationPersisterFactory() {
            @Override
            public ExtensibleConfigurationPersister createConfigurationPersister(ServerEnvironment serverEnvironment, ExecutorService executorService) {
                ConfigurationFile configurationFile = serverEnvironment.getServerConfigurationFile();
                if (runningModeControl.isReloaded()) {
                    configurationFile.resetBootFile(runningModeControl.isUseCurrentConfig(), runningModeControl.getAndClearNewBootFileName());
                }
                QName rootElement = new QName(Namespace.CURRENT.getUriString(), "server");
                StandaloneXml parser = new StandaloneXml(Module.getBootModuleLoader(), executorService, extensionRegistry);
                BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(configurationFile, rootElement, parser, parser,
                        runningModeControl.isReloaded(), serverEnvironment.getLaunchType() == ServerEnvironment.LaunchType.EMBEDDED);
                for (Namespace namespace : Namespace.domainValues()) {
                    if (!namespace.equals(Namespace.CURRENT)) {
                        persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "server"), parser);
                    }
                }
                extensionRegistry.setWriterRegistry(persister);
                return persister;
            }

            private boolean isNewConfiguration(ConfigurationFile.InteractionPolicy interactionPolicy) {
                return interactionPolicy == ConfigurationFile.InteractionPolicy.NEW
                        || interactionPolicy == ConfigurationFile.InteractionPolicy.DISCARD;
            }
        };
    }
    return configurationPersisterFactory;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:36,代码来源:Bootstrap.java

示例13: initializeSlaveDomainRegistry

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
@Override
public void initializeSlaveDomainRegistry(ManagementResourceRegistration root,
        ExtensibleConfigurationPersister configurationPersister, ContentRepository contentRepository,
        HostFileRepository fileRepository, LocalHostControllerInfo hostControllerInfo,
        ExtensionRegistry extensionRegistry, IgnoredDomainResourceRegistry ignoredDomainResourceRegistry,
        PathManagerService pathManager) {
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:8,代码来源:TestModelControllerService.java

示例14: createCachedRemoteDomainXmlConfigurationPersister

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public static ExtensibleConfigurationPersister createCachedRemoteDomainXmlConfigurationPersister(final File configDir, ExecutorService executorService, ExtensionRegistry extensionRegistry) {
    return createRemoteBackupDomainXmlConfigurationPersister(configDir, executorService, extensionRegistry);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:4,代码来源:ConfigurationPersisterFactory.java

示例15: createTransientDomainXmlConfigurationPersister

import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; //导入依赖的package包/类
public static ExtensibleConfigurationPersister createTransientDomainXmlConfigurationPersister(ExecutorService executorService, ExtensionRegistry extensionRegistry) {
    DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry);
    ExtensibleConfigurationPersister persister = new NullConfigurationPersister(domainXml);
    extensionRegistry.setWriterRegistry(persister);
    return persister;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:7,代码来源:ConfigurationPersisterFactory.java


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