public abstract class ModelTestKernelServicesImpl<T extends ModelTestKernelServices<T>> extends Object implements ModelTestKernelServices<T>
Modifier | Constructor and Description |
---|---|
protected |
ModelTestKernelServicesImpl(org.jboss.msc.service.ServiceContainer container,
ModelTestModelControllerService controllerService,
StringConfigurationPersister persister,
ManagementResourceRegistration rootRegistration,
OperationValidator operationValidator,
ModelVersion legacyModelVersion,
boolean successfulBoot,
Throwable bootError) |
Modifier and Type | Method and Description |
---|---|
protected void |
addLegacyKernelService(ModelVersion modelVersion,
T legacyServices) |
protected void |
checkIsMainController() |
protected TransformationContext |
createTransformationContext(TransformationTarget target,
TransformerOperationAttachment attachment) |
void |
executeForFailure(org.jboss.dmr.ModelNode operation,
InputStream... inputStreams)
Execute an operation in the model controller, expecting failure.
|
org.jboss.dmr.ModelNode |
executeForResult(org.jboss.dmr.ModelNode operation,
InputStream... inputStreams) |
org.jboss.dmr.ModelNode |
executeOperation(org.jboss.dmr.ModelNode operation,
InputStream... inputStreams)
Execute an operation in the model controller
|
org.jboss.dmr.ModelNode |
executeOperation(org.jboss.dmr.ModelNode operation,
ModelController.OperationTransactionControl txControl) |
Throwable |
getBootError()
Get any errors thrown on boot
|
org.jboss.msc.service.ServiceContainer |
getContainer()
Gets the service container
|
protected String |
getControllerClassSimpleName() |
T |
getLegacyServices(ModelVersion modelVersion)
Gets the legacy controller services for the controller containing the passed in model version
|
String |
getPersistedSubsystemXml()
Reads the persisted subsystem xml
|
ImmutableManagementResourceRegistration |
getRootRegistration() |
protected TransformerRegistry |
getTransformersRegistry() |
protected org.jboss.dmr.ModelNode |
internalExecute(org.jboss.dmr.ModelNode operation,
OperationStepHandler handler) |
boolean |
isSuccessfulBoot()
Get whether the controller booted successfully
|
org.jboss.dmr.ModelNode |
readWholeModel()
Reads the whole model from the model controller without aliases or runtime attributes/resources
|
org.jboss.dmr.ModelNode |
readWholeModel(boolean includeAliases)
Reads the whole model from the model controller without runtime attributes/resources
|
org.jboss.dmr.ModelNode |
readWholeModel(boolean includeAliases,
boolean includeRuntime)
Reads the whole model from the model controller
|
void |
shutdown() |
void |
validateOperation(org.jboss.dmr.ModelNode operation)
Validates the operation against the description providers in the model controller
|
void |
validateOperations(List<org.jboss.dmr.ModelNode> operations)
Validates the operations against the description providers in the model controller
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeOperation, readTransformedModel, transformOperation, transformOperation
protected ModelTestKernelServicesImpl(org.jboss.msc.service.ServiceContainer container, ModelTestModelControllerService controllerService, StringConfigurationPersister persister, ManagementResourceRegistration rootRegistration, OperationValidator operationValidator, ModelVersion legacyModelVersion, boolean successfulBoot, Throwable bootError)
public boolean isSuccessfulBoot()
isSuccessfulBoot
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
public Throwable getBootError()
getBootError
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
public T getLegacyServices(ModelVersion modelVersion)
getLegacyServices
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
modelVersion
- the model version of the legacy model controllerIllegalStateException
- if this is not the test's main model controllerIllegalStateException
- if there is no legacy controller containing the versionprotected void checkIsMainController()
public org.jboss.dmr.ModelNode readWholeModel()
readWholeModel
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
public org.jboss.dmr.ModelNode readWholeModel(boolean includeAliases)
readWholeModel
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
includeAliases
- whether to include aliasespublic org.jboss.dmr.ModelNode readWholeModel(boolean includeAliases, boolean includeRuntime)
readWholeModel
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
includeAliases
- whether to include aliasesincludeRuntime
- whether to include runtime attributes/resourcespublic org.jboss.msc.service.ServiceContainer getContainer()
getContainer
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
public org.jboss.dmr.ModelNode executeOperation(org.jboss.dmr.ModelNode operation, InputStream... inputStreams)
executeOperation
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
operation
- the operation to executeinputStreams
- Input Streams for the operationpublic org.jboss.dmr.ModelNode executeOperation(org.jboss.dmr.ModelNode operation, ModelController.OperationTransactionControl txControl)
executeOperation
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
public org.jboss.dmr.ModelNode executeForResult(org.jboss.dmr.ModelNode operation, InputStream... inputStreams) throws OperationFailedException
executeForResult
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
OperationFailedException
public void executeForFailure(org.jboss.dmr.ModelNode operation, InputStream... inputStreams)
executeForFailure
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
operation
- the operation to executepublic String getPersistedSubsystemXml()
getPersistedSubsystemXml
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
public void validateOperations(List<org.jboss.dmr.ModelNode> operations)
validateOperations
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
operations
- the operations to validatepublic void validateOperation(org.jboss.dmr.ModelNode operation)
validateOperation
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
operation
- the operation to validatepublic void shutdown()
shutdown
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
public ImmutableManagementResourceRegistration getRootRegistration()
getRootRegistration
in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
protected void addLegacyKernelService(ModelVersion modelVersion, T legacyServices)
protected org.jboss.dmr.ModelNode internalExecute(org.jboss.dmr.ModelNode operation, OperationStepHandler handler)
protected TransformationContext createTransformationContext(TransformationTarget target, TransformerOperationAttachment attachment)
protected TransformerRegistry getTransformersRegistry()
protected String getControllerClassSimpleName()
Copyright © 2023 JBoss by Red Hat. All rights reserved.