當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。