public abstract class AbstractControllerService extends Object implements org.jboss.msc.service.Service<ModelController>
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractControllerService.ControllerInstabilityListener
Listener for notifications that the
ModelController is unstable and a
process restart is necessary. |
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.
|
protected static RuntimeCapability<Void> |
CLIENT_FACTORY_CAPABILITY
Capability in-vm users of the controller use to create clients
|
static int |
DEFAULT_BOOT_STACK_SIZE
The default stack size for the thread used to process boot operations.
|
static RuntimeCapability<Void> |
EXECUTOR_CAPABILITY
Capability users of the controller use to perform asynchronous management tasks.
|
protected static RuntimeCapability<Void> |
NOTIFICATION_REGISTRY_CAPABILITY
Capability in-vm users of the controller use to register notification handlers
|
static RuntimeCapability<Void> |
PATH_MANAGER_CAPABILITY
Capability users of the controller use to coordinate changes to paths.
|
protected ProcessType |
processType |
protected ManagementSecurityIdentitySupplier |
securityIdentitySupplier |
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,
ManagementSecurityIdentitySupplier securityIdentitySupplier)
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,
ManagementSecurityIdentitySupplier securityIdentitySupplier,
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() |
protected org.jboss.msc.value.InjectedValue<AbstractControllerService.ControllerInstabilityListener> |
getContainerInstabilityInjector() |
org.jboss.msc.value.InjectedValue<ExecutorService> |
getExecutorServiceInjector() |
protected int |
getMaxParallelBootExtensionTasks() |
protected int |
getMaxParallelBootSubsystemTasks() |
protected AbstractControllerService.ModelControllerServiceInitializationParams |
getModelControllerServiceInitializationParams()
Override to return a
AbstractControllerService.ModelControllerServiceInitializationParams . |
protected MutableRootResourceRegistrationProvider |
getMutableRootResourceRegistrationProvider() |
protected NotificationSupport |
getNotificationSupport() |
protected AbstractControllerService.PartialModelIndicator |
getPartialModelIndicator() |
protected org.jboss.msc.service.StabilityMonitor |
getStabilityMonitor() |
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 boolean |
isExposingClientServicesAllowed()
Gets whether this controller service should install a
ModelControllerClientFactory
and a NotificationHandlerRegistry
as a service. |
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 static final RuntimeCapability<Void> CLIENT_FACTORY_CAPABILITY
protected static final RuntimeCapability<Void> NOTIFICATION_REGISTRY_CAPABILITY
public static final RuntimeCapability<Void> PATH_MANAGER_CAPABILITY
public static final RuntimeCapability<Void> EXECUTOR_CAPABILITY
protected final ProcessType processType
protected final DelegatingConfigurableAuthorizer authorizer
protected final ManagementSecurityIdentitySupplier securityIdentitySupplier
@Deprecated protected AbstractControllerService(ProcessType processType, RunningModeControl runningModeControl, ConfigurationPersister configurationPersister, ControlledProcessState processState, DescriptionProvider rootDescriptionProvider, OperationStepHandler prepareStep, ExpressionResolver expressionResolver, ManagedAuditLogger auditLogger, DelegatingConfigurableAuthorizer authorizer, ManagementSecurityIdentitySupplier securityIdentitySupplier)
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, ManagementSecurityIdentitySupplier securityIdentitySupplier, 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 loggerauthorizer
- handles authorizationcapabilityRegistry
- the capability registry@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
org.jboss.msc.service.StartException
protected int getMaxParallelBootExtensionTasks()
protected int getMaxParallelBootSubsystemTasks()
protected boolean isExposingClientServicesAllowed()
ModelControllerClientFactory
and a NotificationHandlerRegistry
as a service. Default is true
; this method allows test infrastructure subclasses to turn this off.true
if a service should be installedprotected 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 NotificationSupport getNotificationSupport()
protected final MutableRootResourceRegistrationProvider getMutableRootResourceRegistrationProvider()
protected AbstractControllerService.PartialModelIndicator getPartialModelIndicator()
protected final org.jboss.msc.service.StabilityMonitor getStabilityMonitor()
public void stop(org.jboss.msc.service.StopContext context)
stop
in interface org.jboss.msc.Service
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 org.jboss.msc.value.InjectedValue<AbstractControllerService.ControllerInstabilityListener> getContainerInstabilityInjector()
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 © 2019 JBoss by Red Hat. All rights reserved.