Class ModelTestModelControllerService

  • All Implemented Interfaces:
    org.jboss.msc.Service, org.jboss.msc.service.Service<org.jboss.as.controller.ModelController>, org.jboss.msc.value.Value<org.jboss.as.controller.ModelController>

    public abstract class ModelTestModelControllerService
    extends org.jboss.as.controller.AbstractControllerService
    Internal class used by test framework.Boots up the model controller used for the test. While the super class AbstractControllerService exists here in the main code source, for the legacy controllers it is got from the xxxx/test-controller-xxx jars instead (see the constructor javadocs for more information)
    Author:
    Kabir Khan, Tomaz Cerar
    • Constructor Detail

      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.descriptions.DescriptionProvider rootDescriptionProvider,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  ModelTestModelControllerService.Controller74x version)
        This is the constructor to use for subsystem-test/test-controller-7.4.x
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition resourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  ModelTestModelControllerService.Controller90x version)
        This is the constructor to use for 9.0.x subsystem tests
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition resourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  ModelTestModelControllerService.Controller10x version)
        This is the constructor to use for 10.0.x subsystem tests
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition resourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  ModelTestModelControllerService.Controller11x version)
        This is the constructor to use for 11.0.x subsystem tests
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition rootResourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.ExpressionResolver expressionResolver,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry,
                                                  ModelTestModelControllerService.Controller14x version)
        This is the constructor to use for 14.0.x core model tests
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition resourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry,
                                                  ModelTestModelControllerService.Controller14x version)
        This is the constructor to use for 14.0.x subsystem tests
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition rootResourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.ExpressionResolver expressionResolver,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry,
                                                  ModelTestModelControllerService.Controller18x version)
        This is the constructor to use for 18.0.x core model tests.
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition resourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry,
                                                  ModelTestModelControllerService.Controller18x version)
        This is the constructor to use for 18.0.x subsystem tests.
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition rootResourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.ExpressionResolver expressionResolver,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry,
                                                  ModelTestModelControllerService.Controller23x version)
        This is the constructor to use for 23.0.x core model tests.
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition resourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry,
                                                  ModelTestModelControllerService.Controller23x version)
        This is the constructor to use for 23.0.x subsystem tests.
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  ModelTestModelControllerService.DelegatingResourceDefinition rootResourceDefinition,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.ExpressionResolver expressionResolver,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry)
        This is the constructor to use for current core model tests
      • ModelTestModelControllerService

        protected ModelTestModelControllerService​(org.jboss.as.controller.ProcessType processType,
                                                  org.jboss.as.controller.RunningModeControl runningModeControl,
                                                  org.jboss.as.controller.transform.TransformerRegistry transformerRegistry,
                                                  StringConfigurationPersister persister,
                                                  ModelTestOperationValidatorFilter validateOpsFilter,
                                                  org.jboss.as.controller.ResourceDefinition resourceDefinition,
                                                  org.jboss.as.controller.ExpressionResolver expressionResolver,
                                                  org.jboss.as.controller.ControlledProcessState processState,
                                                  org.jboss.as.controller.CapabilityRegistry capabilityRegistry)
        This is the constructor to use for current subsystem tests
    • Method Detail

      • isSuccessfulBoot

        public boolean isSuccessfulBoot()
      • getBootError

        public Throwable getBootError()
      • initModel

        protected void initModel​(org.jboss.as.controller.ManagementModel managementModel,
                                 org.jboss.as.controller.registry.Resource modelControllerResource)
        Specified by:
        initModel in class org.jboss.as.controller.AbstractControllerService
      • initModel

        @Deprecated
        protected void initModel​(org.jboss.as.controller.registry.Resource rootResource,
                                 org.jboss.as.controller.registry.ManagementResourceRegistration rootRegistration,
                                 org.jboss.as.controller.registry.Resource modelControllerResource)
        Deprecated.
        only for legacy version support
      • initCoreModel

        protected void initCoreModel​(org.jboss.as.controller.ManagementModel managementModel,
                                     org.jboss.as.controller.registry.Resource modelControllerResource)
      • initCoreModel

        @Deprecated
        protected void initCoreModel​(org.jboss.as.controller.registry.Resource rootResource,
                                     org.jboss.as.controller.registry.ManagementResourceRegistration rootRegistration,
                                     org.jboss.as.controller.registry.Resource modelControllerResource)
        Deprecated.
        only for legacy version support
      • initExtraModel

        protected void initExtraModel​(org.jboss.as.controller.ManagementModel managementModel)
      • initExtraModel

        @Deprecated
        protected void initExtraModel​(org.jboss.as.controller.registry.Resource rootResource,
                                      org.jboss.as.controller.registry.ManagementResourceRegistration rootRegistration)
        Deprecated.
        only for legacy version support
      • boot

        protected boolean boot​(List<org.jboss.dmr.ModelNode> bootOperations,
                               boolean rollbackOnRuntimeFailure)
                        throws org.jboss.as.controller.persistence.ConfigurationPersistenceException
        Overrides:
        boot in class org.jboss.as.controller.AbstractControllerService
        Throws:
        org.jboss.as.controller.persistence.ConfigurationPersistenceException
      • preBoot

        protected void preBoot​(List<org.jboss.dmr.ModelNode> bootOperations,
                               boolean rollbackOnRuntimeFailure)
      • postBoot

        protected void postBoot()
        Overrides:
        postBoot in class org.jboss.as.controller.AbstractControllerService
      • bootThreadDone

        protected void bootThreadDone()
        Overrides:
        bootThreadDone in class org.jboss.as.controller.AbstractControllerService
      • countdownDoneLatch

        protected void countdownDoneLatch()
      • start

        public void start​(org.jboss.msc.service.StartContext context)
                   throws org.jboss.msc.service.StartException
        Specified by:
        start in interface org.jboss.msc.Service
        Specified by:
        start in interface org.jboss.msc.service.Service<org.jboss.as.controller.ModelController>
        Overrides:
        start in class org.jboss.as.controller.AbstractControllerService
        Throws:
        org.jboss.msc.service.StartException
      • getRootRegistration

        public org.jboss.as.controller.registry.ManagementResourceRegistration getRootRegistration()
      • grabRootResource

        public static org.jboss.as.controller.registry.Resource grabRootResource​(ModelTestKernelServices<?> kernelServices)
        Grabs the current root resource. This cannot be called after the kernelServices have been shut down
        Parameters:
        kernelServices - the kernel services used to access the controller
      • internalExecute

        protected org.jboss.dmr.ModelNode internalExecute​(org.jboss.dmr.ModelNode operation,
                                                          org.jboss.as.controller.client.OperationMessageHandler handler,
                                                          org.jboss.as.controller.ModelController.OperationTransactionControl control,
                                                          org.jboss.as.controller.client.OperationAttachments attachments,
                                                          org.jboss.as.controller.OperationStepHandler prepareStep)
        Overrides:
        internalExecute in class org.jboss.as.controller.AbstractControllerService