Package org.jboss.as.controller
Class ReloadRequiredAddStepHandler
java.lang.Object
org.jboss.as.controller.AbstractAddStepHandler
org.jboss.as.controller.ReloadRequiredAddStepHandler
- All Implemented Interfaces:
OperationDescriptor,OperationStepHandler
An handler for an 'add' operation that does nothing in the
runtime stage but put the process in
reload-required state. It does nothing at all in the runtime stage during boot.
Use case for this handler is for resources that only represent configuration data of their parent. During boot in the runtime stage the parent reads the child model and configures its services accordingly. Thereafter any change to the child model should put the process in reload-required.
The RestartParentResourceAddHandler performs a similar function, but
allows restart of the parent resource.
- Author:
- Brian Stansberry
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jboss.as.controller.AbstractAddStepHandler
AbstractAddStepHandler.Parameters -
Field Summary
FieldsFields inherited from class org.jboss.as.controller.AbstractAddStepHandler
attributes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReloadRequiredAddStepHandler(Collection<AttributeDefinition> attributes) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead.ReloadRequiredAddStepHandler(AttributeDefinition... attributes) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidperformRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) Make any runtime changes necessary to effect the changes indicated by the givenoperation.protected booleanrequiresRuntime(OperationContext context) Gets whether aOperationContext.Stage.RUNTIMEstep should be added to callAbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}.protected voidrollbackRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) Rollback runtime changes made inAbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource).Methods inherited from class org.jboss.as.controller.AbstractAddStepHandler
createResource, createResource, execute, getAttributes, performRuntime, populateModel, populateModel, populateModel, recordCapabilitiesAndRequirements
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ReloadRequiredAddStepHandler
protected ReloadRequiredAddStepHandler() -
ReloadRequiredAddStepHandler
Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead. -
ReloadRequiredAddStepHandler
@Deprecated(forRemoval=true) public ReloadRequiredAddStepHandler(Collection<AttributeDefinition> attributes) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead. -
ReloadRequiredAddStepHandler
@Deprecated(forRemoval=true) public ReloadRequiredAddStepHandler(AbstractAddStepHandler.Parameters parameters) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead.
-
-
Method Details
-
requiresRuntime
Description copied from class:AbstractAddStepHandlerGets whether aOperationContext.Stage.RUNTIMEstep should be added to callAbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}. This default implementation will returntruefor a normal server running in normal (non admin-only) mode. If running on a host controller, it will returntrueif it is the active copy of the host controller subsystem. Subclasses that perform no runtime update could override and returnfalse. This method is invoked duringOperationContext.Stage.MODEL.- Overrides:
requiresRuntimein classAbstractAddStepHandler- Parameters:
context- operation context- Returns:
trueifperformRuntimeshould be invoked;falseotherwise.
-
performRuntime
protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) Description copied from class:AbstractAddStepHandlerMake any runtime changes necessary to effect the changes indicated by the givenoperation. Executes afterAbstractAddStepHandler.populateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode), so the givenresourceparameter will reflect any changes made in that method. This method is invoked duringOperationContext.Stage.RUNTIME. Subclasses that wish to make changes to runtime services should override either this method or theAbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)variant. Override this one if you wish to make use of theresourceparameter beyond simplyaccessing its model property.This default implementation simply calls the
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)variant. Subclasses that override this method should not callsuper.performRuntime(...).- Overrides:
performRuntimein classAbstractAddStepHandler- Parameters:
context- the operation contextoperation- the operation being executedresource- persistent configuration resource that corresponds to the address ofoperation
-
rollbackRuntime
protected void rollbackRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) Description copied from class:AbstractAddStepHandlerRollback runtime changes made inAbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource). Any services that were added inOperationContext.Stage.RUNTIMEwill be automatically removed after this method executes. Called from theOperationContext.ResultHandlerorOperationContext.RollbackHandlerpassed toOperationContext.completeStep(...).- Overrides:
rollbackRuntimein classAbstractAddStepHandler- Parameters:
context- the operation contextoperation- the operation being executedresource- persistent configuration model node that corresponds to the address ofoperation
-
INSTANCEinstead.