Package org.jboss.as.controller
Class ReloadRequiredWriteAttributeHandler
java.lang.Object
org.jboss.as.controller.AbstractWriteAttributeHandler<Void>
org.jboss.as.controller.ReloadRequiredWriteAttributeHandler
- All Implemented Interfaces:
OperationStepHandler
- Direct Known Subclasses:
CredentialReferenceWriteAttributeHandler
Simple
AbstractWriteAttributeHandler that triggers putting the process in a restart-required state if attribute that
has flag AttributeAccess.Flag.RESTART_JVM otherwise it puts process in
reload-required state.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
AbstractWriteAttributeHandler.HandbackHolder<T> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReloadRequiredWriteAttributeHandler(Collection<AttributeDefinition> definitions) Deprecated, for removal: This API element is subject to removal in a future version.ReloadRequiredWriteAttributeHandler(AttributeDefinition... definitions) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanapplyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Void> voidHandback) Hook to allow subclasses to make runtime changes to effect the attribute value change.protected voidrevertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode resolvedValue, Void handback) Hook to allow subclasses to revert runtime changes made inAbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder).Methods inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
execute, finishModelStage, getAttributeDefinition, recordCapabilitiesAndRequirements, requiresRuntime, validateUpdatedModel
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ReloadRequiredWriteAttributeHandler
protected ReloadRequiredWriteAttributeHandler() -
ReloadRequiredWriteAttributeHandler
@Deprecated(forRemoval=true) public ReloadRequiredWriteAttributeHandler(AttributeDefinition... definitions) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead. -
ReloadRequiredWriteAttributeHandler
@Deprecated(forRemoval=true) public ReloadRequiredWriteAttributeHandler(Collection<AttributeDefinition> definitions) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead.
-
-
Method Details
-
applyUpdateToRuntime
protected boolean applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Void> voidHandback) throws OperationFailedException Description copied from class:AbstractWriteAttributeHandlerHook to allow subclasses to make runtime changes to effect the attribute value change.- Specified by:
applyUpdateToRuntimein classAbstractWriteAttributeHandler<Void>- Parameters:
context- the context of the operationoperation- the operationattributeName- the name of the attribute being modifiedresolvedValue- the new value for the attribute, after anyValueExpressionhas been resolvedcurrentValue- the existing value for the attributevoidHandback- holder for an arbitrary object to pass toAbstractWriteAttributeHandler.revertUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, Object)if the operation needs to be rolled back- Returns:
trueif the server requires reload to effect the attribute value change;falseif not- Throws:
OperationFailedException
-
revertUpdateToRuntime
protected void revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode resolvedValue, Void handback) throws OperationFailedException Description copied from class:AbstractWriteAttributeHandlerHook to allow subclasses to revert runtime changes made inAbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder).- Specified by:
revertUpdateToRuntimein classAbstractWriteAttributeHandler<Void>- Parameters:
context- the context of the operationoperation- the operationattributeName- the name of the attribute being modifiedvalueToRestore- the previous value for the attribute, before this operation was executedresolvedValue- the new value for the attribute that should be revertedhandback- an object, if any, passed in to thehandbackHolderby theapplyUpdateToRuntimeimplementation- Throws:
OperationFailedException
-
INSTANCEinstead.