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 Modifier and Type Field Description protected Collection<? extends AttributeDefinition>
attributes
protected Set<RuntimeCapability>
capabilities
-
Constructor Summary
Constructors Modifier Constructor Description protected
RestartParentResourceAddHandler(String parentKeyName)
RestartParentResourceAddHandler(String parentKeyName, Set<RuntimeCapability> capabilities, Collection<? extends AttributeDefinition> attributes)
protected
RestartParentResourceAddHandler(String parentKeyName, RuntimeCapability... capabilities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends AttributeDefinition>
getAttributes()
protected void
populateModel(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 void
recordCapabilitiesAndRequirements(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource)
protected void
updateModel(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, removeServices, requiresRuntime, rollbackRuntime
-
-
-
-
Field Detail
-
capabilities
protected final Set<RuntimeCapability> capabilities
-
attributes
protected final Collection<? extends AttributeDefinition> attributes
-
-
Constructor Detail
-
RestartParentResourceAddHandler
protected RestartParentResourceAddHandler(String parentKeyName)
-
RestartParentResourceAddHandler
protected RestartParentResourceAddHandler(String parentKeyName, RuntimeCapability... capabilities)
-
RestartParentResourceAddHandler
public RestartParentResourceAddHandler(String parentKeyName, Set<RuntimeCapability> capabilities, Collection<? extends AttributeDefinition> attributes)
-
-
Method Detail
-
getAttributes
public Collection<? extends AttributeDefinition> getAttributes()
- Specified by:
getAttributes
in interfaceOperationDescriptor
-
updateModel
protected void updateModel(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
Description copied from class:RestartParentResourceHandlerBase
Performs the update to the persistent configuration model.- Specified by:
updateModel
in 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
- ifoperation
is invalid or populating the model otherwise fails
-
-