public abstract class AbstractModelUpdateHandler extends Object implements OperationStepHandler
OperationStepHandler implementations for updating an existing managed resource.| Constructor and Description |
|---|
AbstractModelUpdateHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(OperationContext context,
org.jboss.dmr.ModelNode operation)
{@inheritDoc
|
protected void |
performRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
Resource resource)
Make any runtime changes necessary to effect the changes indicated by the given
operation. |
protected boolean |
requiresRuntime(OperationContext context)
Gets whether
performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}
should be called. |
protected void |
rollbackRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
Resource resource)
Rollback runtime changes made in
performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource). |
protected abstract void |
updateModel(org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
Update the given node in the persistent configuration model based on the values in the given operation.
|
protected void |
updateModel(org.jboss.dmr.ModelNode operation,
Resource resource)
Update the given resource in the persistent configuration model based on the values in the given operation.
|
public void execute(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
execute in interface OperationStepHandlercontext - the operation contextoperation - the operation being executedOperationFailedException - if the operation failed before calling context.completeStep()protected void updateModel(org.jboss.dmr.ModelNode operation,
Resource resource)
throws OperationFailedException
operation - the operationresource - the resource that corresponds to the address of operationOperationFailedException - if operation is invalid or populating the model otherwise failsprotected abstract void updateModel(org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
throws OperationFailedException
operation - the operationmodel - persistent configuration model node that corresponds to the address of operationOperationFailedException - if operation is invalid or populating the model otherwise failsprotected boolean requiresRuntime(OperationContext context)
performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}
should be called.context - operation contexttrue if performRuntime should be invoked; false otherwise.protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) throws OperationFailedException
operation. Executes
after updateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode), so the given model
parameter will reflect any changes made in that method.
This default implementation does nothing.
context - the operation contextoperation - the operation being executedresource - the resource that corresponds to the address of operationOperationFailedException - if operation is invalid or updating the runtime otherwise failsprotected void rollbackRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource)
performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource).
This default implementation removes all services in the given list of controllers. The contents of
controllers is the same as what was in the newControllers parameter passed to performRuntime()
when that method returned.
context - the operation contextoperation - the operation being executedresource - the resource that corresponds to the address of operationCopyright © 2017 JBoss by Red Hat. All rights reserved.