public abstract class AbstractControllerService extends Object implements org.jboss.msc.service.Service<ModelController>
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractControllerService.ModelControllerServiceInitializationParams
Parameters for initializing
ModelControllerServiceInitialization instances |
protected static interface |
AbstractControllerService.PartialModelIndicator
Tracks whether the controller is working with a complete model or just a partial one.
|
Modifier and Type | Field and Description |
---|---|
protected DelegatingConfigurableAuthorizer |
authorizer |
static String |
BOOT_STACK_SIZE_PROPERTY
Name of the system property to set to control the stack size for the thread used to process boot operations.
|
static int |
DEFAULT_BOOT_STACK_SIZE
The default stack size for the thread used to process boot operations.
|
protected ProcessType |
processType |
Modifier | Constructor and Description |
---|---|
protected |
AbstractControllerService(ProcessType processType,
RunningModeControl runningModeControl,
ConfigurationPersister configurationPersister,
ControlledProcessState processState,
DescriptionProvider rootDescriptionProvider,
OperationStepHandler prepareStep,
ExpressionResolver expressionResolver)
Deprecated.
Here for backwards compatibility for ModelTestModelControllerService
|
protected |
AbstractControllerService(ProcessType processType,
RunningModeControl runningModeControl,
ConfigurationPersister configurationPersister,
ControlledProcessState processState,
DescriptionProvider rootDescriptionProvider,
OperationStepHandler prepareStep,
ExpressionResolver expressionResolver,
ManagedAuditLogger auditLogger,
DelegatingConfigurableAuthorizer authorizer)
Deprecated.
|
protected |
AbstractControllerService(ProcessType processType,
RunningModeControl runningModeControl,
ConfigurationPersister configurationPersister,
ControlledProcessState processState,
ResourceDefinition rootResourceDefinition,
OperationStepHandler prepareStep,
ExpressionResolver expressionResolver)
Deprecated.
Here for backwards compatibility for ModelTestModelControllerService
|
protected |
AbstractControllerService(ProcessType processType,
RunningModeControl runningModeControl,
ConfigurationPersister configurationPersister,
ControlledProcessState processState,
ResourceDefinition rootResourceDefinition,
OperationStepHandler prepareStep,
ExpressionResolver expressionResolver,
ManagedAuditLogger auditLogger,
DelegatingConfigurableAuthorizer authorizer)
Deprecated.
Here for backwards compatibility for ModelTestModelControllerService
|
protected |
AbstractControllerService(ProcessType processType,
RunningModeControl runningModeControl,
ConfigurationPersister configurationPersister,
ControlledProcessState processState,
ResourceDefinition rootResourceDefinition,
OperationStepHandler prepareStep,
ExpressionResolver expressionResolver,
ManagedAuditLogger auditLogger,
DelegatingConfigurableAuthorizer authorizer,
CapabilityRegistry capabilityRegistry)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
acquireReadLock(int operationId) |
protected void |
boot(BootContext context)
Boot the controller.
|
protected boolean |
boot(List<org.jboss.dmr.ModelNode> bootOperations,
boolean rollbackOnRuntimeFailure)
Boot with the given operations, performing full model and capability registry validation.
|
protected boolean |
boot(List<org.jboss.dmr.ModelNode> bootOperations,
boolean rollbackOnRuntimeFailure,
boolean skipModelValidation)
Boot with the given operations, optionally disabling model and capability registry validation.
|
protected boolean |
boot(List<org.jboss.dmr.ModelNode> bootOperations,
boolean rollbackOnRuntimeFailure,
boolean skipModelValidation,
MutableRootResourceRegistrationProvider parallelBootRootResourceRegistrationProvider)
Boot, optionally disabling model and capability registry validation, using the given provider for the root
ManagementResourceRegistration . |
protected boolean |
boot(List<org.jboss.dmr.ModelNode> bootOperations,
boolean rollbackOnRuntimeFailure,
MutableRootResourceRegistrationProvider parallelBootRootResourceRegistrationProvider)
Deprecated.
internal use only only for use by legacy test controllers
|
protected void |
bootThreadDone() |
protected OperationStepHandler |
createExtraValidationStepHandler() |
protected org.jboss.dmr.ModelNode |
executeReadOnlyOperation(org.jboss.dmr.ModelNode operation,
ModelController.OperationTransactionControl control,
OperationStepHandler prepareStep)
Deprecated.
|
protected org.jboss.dmr.ModelNode |
executeReadOnlyOperation(org.jboss.dmr.ModelNode operation,
OperationMessageHandler handler,
ModelController.OperationTransactionControl control,
OperationAttachments attachments,
OperationStepHandler prepareStep,
int lockPermit)
Deprecated.
internal use only and only by legacy test controllers
|
protected org.jboss.dmr.ModelNode |
executeReadOnlyOperation(org.jboss.dmr.ModelNode operation,
OperationMessageHandler handler,
ModelController.OperationTransactionControl control,
OperationStepHandler prepareStep,
int lockPermit)
Deprecated.
internal use only
|
protected org.jboss.dmr.ModelNode |
executeReadOnlyOperation(org.jboss.dmr.ModelNode operation,
Resource model,
ModelController.OperationTransactionControl control,
OperationStepHandler prepareStep)
Deprecated.
|
protected void |
finishBoot() |
protected ManagedAuditLogger |
getAuditLogger() |
protected BootErrorCollector |
getBootErrorCollector() |
org.jboss.msc.value.InjectedValue<ExecutorService> |
getExecutorServiceInjector() |
protected AbstractControllerService.ModelControllerServiceInitializationParams |
getModelControllerServiceInitializationParams()
Override to return a
AbstractControllerService.ModelControllerServiceInitializationParams . |
protected MutableRootResourceRegistrationProvider |
getMutableRootResourceRegistrationProvider() |
protected AbstractControllerService.PartialModelIndicator |
getPartialModelIndicator() |
ModelController |
getValue() |
protected abstract void |
initModel(ManagementModel managementModel,
Resource modelControllerResource) |
protected org.jboss.dmr.ModelNode |
internalExecute(org.jboss.dmr.ModelNode operation,
OperationMessageHandler handler,
ModelController.OperationTransactionControl control,
OperationAttachments attachments,
OperationStepHandler prepareStep)
Deprecated.
internal use only only for use by legacy test controllers
|
protected OperationResponse |
internalExecute(Operation operation,
OperationMessageHandler handler,
ModelController.OperationTransactionControl control,
OperationStepHandler prepareStep) |
protected OperationResponse |
internalExecute(Operation operation,
OperationMessageHandler handler,
ModelController.OperationTransactionControl control,
OperationStepHandler prepareStep,
boolean attemptLock) |
protected OperationResponse |
internalExecute(Operation operation,
OperationMessageHandler handler,
ModelController.OperationTransactionControl control,
OperationStepHandler prepareStep,
boolean attemptLock,
boolean partialModel) |
protected org.jboss.dmr.ModelNode |
registerModelControllerServiceInitializationBootStep(BootContext context)
Used to add the operation used to initialise the ModelControllerServiceInitialization instances.
|
protected void |
releaseReadLock(int operationId) |
protected void |
setConfigurationPersister(ConfigurationPersister persister) |
void |
start(org.jboss.msc.service.StartContext context) |
void |
stop(org.jboss.msc.service.StopContext context) |
protected void |
stopAsynchronous(org.jboss.msc.service.StopContext context)
Hook for subclasses to perform work during the asynchronous task started by
stop(org.jboss.msc.service.StopContext) . |
public static final String BOOT_STACK_SIZE_PROPERTY
DEFAULT_BOOT_STACK_SIZE
,
Constant Field Valuespublic static final int DEFAULT_BOOT_STACK_SIZE
BOOT_STACK_SIZE_PROPERTY
,
Constant Field Valuesprotected final ProcessType processType
protected final DelegatingConfigurableAuthorizer authorizer
@Deprecated protected AbstractControllerService(ProcessType processType, RunningModeControl runningModeControl, ConfigurationPersister configurationPersister, ControlledProcessState processState, DescriptionProvider rootDescriptionProvider, OperationStepHandler prepareStep, ExpressionResolver expressionResolver, ManagedAuditLogger auditLogger, DelegatingConfigurableAuthorizer authorizer)
processType
- the type of process being controlledrunningModeControl
- the controller of the process' running modeconfigurationPersister
- the configuration persisterprocessState
- the controlled process staterootDescriptionProvider
- the root description providerprepareStep
- the prepare step to prepend to operation executionexpressionResolver
- the expression resolverauditLogger
- the audit loggerprotected AbstractControllerService(ProcessType processType, RunningModeControl runningModeControl, ConfigurationPersister configurationPersister, ControlledProcessState processState, ResourceDefinition rootResourceDefinition, OperationStepHandler prepareStep, ExpressionResolver expressionResolver, ManagedAuditLogger auditLogger, DelegatingConfigurableAuthorizer authorizer, CapabilityRegistry capabilityRegistry)
processType
- the type of process being controlledrunningModeControl
- the controller of the process' running modeconfigurationPersister
- the configuration persisterprocessState
- the controlled process staterootResourceDefinition
- the root resource definitionprepareStep
- the prepare step to prepend to operation executionexpressionResolver
- the expression resolverauditLogger
- the audit logger@Deprecated protected AbstractControllerService(ProcessType processType, RunningModeControl runningModeControl, ConfigurationPersister configurationPersister, ControlledProcessState processState, DescriptionProvider rootDescriptionProvider, OperationStepHandler prepareStep, ExpressionResolver expressionResolver)
processType
- the type of process being controlledrunningModeControl
- the controller of the process' running modeconfigurationPersister
- the configuration persisterprocessState
- the controlled process staterootDescriptionProvider
- the root description providerprepareStep
- the prepare step to prepend to operation executionexpressionResolver
- the expression resolver@Deprecated protected AbstractControllerService(ProcessType processType, RunningModeControl runningModeControl, ConfigurationPersister configurationPersister, ControlledProcessState processState, ResourceDefinition rootResourceDefinition, OperationStepHandler prepareStep, ExpressionResolver expressionResolver)
processType
- the type of process being controlledrunningModeControl
- the controller of the process' running modeconfigurationPersister
- the configuration persisterprocessState
- the controlled process staterootResourceDefinition
- the root resource definitionprepareStep
- the prepare step to prepend to operation executionexpressionResolver
- the expression resolver@Deprecated protected AbstractControllerService(ProcessType processType, RunningModeControl runningModeControl, ConfigurationPersister configurationPersister, ControlledProcessState processState, ResourceDefinition rootResourceDefinition, OperationStepHandler prepareStep, ExpressionResolver expressionResolver, ManagedAuditLogger auditLogger, DelegatingConfigurableAuthorizer authorizer)
processType
- the type of process being controlledrunningModeControl
- the controller of the process' running modeconfigurationPersister
- the configuration persisterprocessState
- the controlled process staterootResourceDefinition
- the root resource definitionprepareStep
- the prepare step to prepend to operation executionexpressionResolver
- the expression resolverpublic void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
start
in interface org.jboss.msc.service.Service<ModelController>
org.jboss.msc.service.StartException
protected void boot(BootContext context) throws ConfigurationPersistenceException
context
- the boot contextConfigurationPersistenceException
- if the configuration failed to be loadedprotected boolean boot(List<org.jboss.dmr.ModelNode> bootOperations, boolean rollbackOnRuntimeFailure) throws ConfigurationPersistenceException
bootOperations
- the operations. Cannot be null
rollbackOnRuntimeFailure
- true
if the boot should fail if operations fail in the runtime stagetrue
if boot was successfulConfigurationPersistenceException
protected boolean boot(List<org.jboss.dmr.ModelNode> bootOperations, boolean rollbackOnRuntimeFailure, boolean skipModelValidation) throws ConfigurationPersistenceException
bootOperations
- the operations. Cannot be null
rollbackOnRuntimeFailure
- true
if the boot should fail if operations fail in the runtime stageskipModelValidation
- true
if model and capability validation should be skipped.true
if boot was successfulConfigurationPersistenceException
@Deprecated protected boolean boot(List<org.jboss.dmr.ModelNode> bootOperations, boolean rollbackOnRuntimeFailure, MutableRootResourceRegistrationProvider parallelBootRootResourceRegistrationProvider) throws ConfigurationPersistenceException
protected boolean boot(List<org.jboss.dmr.ModelNode> bootOperations, boolean rollbackOnRuntimeFailure, boolean skipModelValidation, MutableRootResourceRegistrationProvider parallelBootRootResourceRegistrationProvider) throws ConfigurationPersistenceException
ManagementResourceRegistration
.bootOperations
- the operations. Cannot be null
rollbackOnRuntimeFailure
- true
if the boot should fail if operations fail in the runtime stageskipModelValidation
- true
if model and capability validation should be skipped.parallelBootRootResourceRegistrationProvider
- provider of the root resource registrationtrue
if boot was successfulConfigurationPersistenceException
@Deprecated protected org.jboss.dmr.ModelNode internalExecute(org.jboss.dmr.ModelNode operation, OperationMessageHandler handler, ModelController.OperationTransactionControl control, OperationAttachments attachments, OperationStepHandler prepareStep)
protected OperationResponse internalExecute(Operation operation, OperationMessageHandler handler, ModelController.OperationTransactionControl control, OperationStepHandler prepareStep)
protected OperationResponse internalExecute(Operation operation, OperationMessageHandler handler, ModelController.OperationTransactionControl control, OperationStepHandler prepareStep, boolean attemptLock)
protected OperationResponse internalExecute(Operation operation, OperationMessageHandler handler, ModelController.OperationTransactionControl control, OperationStepHandler prepareStep, boolean attemptLock, boolean partialModel)
@Deprecated protected org.jboss.dmr.ModelNode executeReadOnlyOperation(org.jboss.dmr.ModelNode operation, OperationMessageHandler handler, ModelController.OperationTransactionControl control, OperationAttachments attachments, OperationStepHandler prepareStep, int lockPermit)
@Deprecated protected org.jboss.dmr.ModelNode executeReadOnlyOperation(org.jboss.dmr.ModelNode operation, OperationMessageHandler handler, ModelController.OperationTransactionControl control, OperationStepHandler prepareStep, int lockPermit)
@Deprecated protected org.jboss.dmr.ModelNode executeReadOnlyOperation(org.jboss.dmr.ModelNode operation, ModelController.OperationTransactionControl control, OperationStepHandler prepareStep)
@Deprecated protected org.jboss.dmr.ModelNode executeReadOnlyOperation(org.jboss.dmr.ModelNode operation, Resource model, ModelController.OperationTransactionControl control, OperationStepHandler prepareStep)
protected void finishBoot() throws ConfigurationPersistenceException
protected void bootThreadDone()
protected final MutableRootResourceRegistrationProvider getMutableRootResourceRegistrationProvider()
protected AbstractControllerService.PartialModelIndicator getPartialModelIndicator()
public void stop(org.jboss.msc.service.StopContext context)
stop
in interface org.jboss.msc.service.Service<ModelController>
protected void stopAsynchronous(org.jboss.msc.service.StopContext context)
stop(org.jboss.msc.service.StopContext)
. This base method does nothing.
Subclasses must not invoke LifecycleContext.complete()
context
- the stop contextpublic ModelController getValue() throws IllegalStateException, IllegalArgumentException
getValue
in interface org.jboss.msc.value.Value<ModelController>
SecurityException
- if the caller does not have ModelController.ACCESS_PERMISSION
IllegalStateException
IllegalArgumentException
public org.jboss.msc.value.InjectedValue<ExecutorService> getExecutorServiceInjector()
protected void setConfigurationPersister(ConfigurationPersister persister)
protected abstract void initModel(ManagementModel managementModel, Resource modelControllerResource)
protected ManagedAuditLogger getAuditLogger()
protected BootErrorCollector getBootErrorCollector()
protected OperationStepHandler createExtraValidationStepHandler()
protected void acquireReadLock(int operationId) throws InterruptedException
InterruptedException
protected void releaseReadLock(int operationId)
protected final org.jboss.dmr.ModelNode registerModelControllerServiceInitializationBootStep(BootContext context)
null
value from getModelControllerServiceInitializationParams()
context
- the boot contextprotected AbstractControllerService.ModelControllerServiceInitializationParams getModelControllerServiceInitializationParams()
AbstractControllerService.ModelControllerServiceInitializationParams
. If null
is returned,
registerModelControllerServiceInitializationBootStep(BootContext)
will not perform any initialization
of ModelControllerServiceInitialization
instances.ModelControllerServiceInitialization
instancesCopyright © 2023 JBoss by Red Hat. All rights reserved.