Package org.jboss.as.controller
Class RestartParentResourceAddHandler
java.lang.Object
org.jboss.as.controller.RestartParentResourceHandlerBase
org.jboss.as.controller.RestartParentResourceAddHandler
- All Implemented Interfaces:
OperationDescriptor,OperationStepHandler
public abstract class RestartParentResourceAddHandler
extends RestartParentResourceHandlerBase
implements OperationDescriptor
Simple add handler which, if allowed, restarts a parent resource when the child is added.
Otherwise the server is put into a forced reload.
- Author:
- Jason T. Greene
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRestartParentResourceAddHandler(String parentKeyName) protectedRestartParentResourceAddHandler(String parentKeyName, Collection<? extends AttributeDefinition> attributes) RestartParentResourceAddHandler(String parentKeyName, Set<RuntimeCapability> capabilities, Collection<? extends AttributeDefinition> attributes) Deprecated, for removal: This API element is subject to removal in a future version.protectedRestartParentResourceAddHandler(String parentKeyName, RuntimeCapability... capabilities) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends AttributeDefinition>protected voidpopulateModel(org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) Populate the given node in the persistent configuration model based on the values in the given operation.protected voidrecordCapabilitiesAndRequirements(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) protected voidupdateModel(OperationContext context, org.jboss.dmr.ModelNode operation) Performs the update to the persistent configuration model.Methods inherited from class org.jboss.as.controller.RestartParentResourceHandlerBase
execute, getParentAddress, getParentServiceName, isResourceServiceRestartAllowed, recreateParentService, recreateParentService, removeServices, requiresRuntime, rollbackRuntime
-
Field Details
-
attributes
-
-
Constructor Details
-
RestartParentResourceAddHandler
-
RestartParentResourceAddHandler
protected RestartParentResourceAddHandler(String parentKeyName, Collection<? extends AttributeDefinition> attributes) -
RestartParentResourceAddHandler
@Deprecated(forRemoval=true) protected RestartParentResourceAddHandler(String parentKeyName, RuntimeCapability... capabilities) Deprecated, for removal: This API element is subject to removal in a future version. -
RestartParentResourceAddHandler
@Deprecated(forRemoval=true) public RestartParentResourceAddHandler(String parentKeyName, Set<RuntimeCapability> capabilities, Collection<? extends AttributeDefinition> attributes) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getAttributes
- Specified by:
getAttributesin interfaceOperationDescriptor
-
updateModel
protected void updateModel(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException Description copied from class:RestartParentResourceHandlerBasePerforms the update to the persistent configuration model.- Specified by:
updateModelin classRestartParentResourceHandlerBase- Parameters:
context- the operation contextoperation- the operation- Throws:
OperationFailedException- if there is a problem updating the model
-
recordCapabilitiesAndRequirements
protected void recordCapabilitiesAndRequirements(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) throws OperationFailedException - Throws:
OperationFailedException
-
populateModel
protected void populateModel(org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException Populate the given node in the persistent configuration model based on the values in the given operation.- Parameters:
operation- the operationmodel- persistent configuration model node that corresponds to the address ofoperation- Throws:
OperationFailedException- ifoperationis invalid or populating the model otherwise fails
-