public abstract class AbstractRuntimeOnlyHandler extends Object implements OperationStepHandler
OperationContext.Stage.MODEL except
register a OperationContext.Stage.RUNTIME step.| Constructor and Description |
|---|
AbstractRuntimeOnlyHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(OperationContext context,
org.jboss.dmr.ModelNode operation)
Simply adds a
OperationContext.Stage.RUNTIME step that calls
executeRuntimeStep(OperationContext, ModelNode). |
protected abstract void |
executeRuntimeStep(OperationContext context,
org.jboss.dmr.ModelNode operation)
Execute this step in
OperationContext.Stage.RUNTIME. |
protected boolean |
resourceMustExist(OperationContext context,
org.jboss.dmr.ModelNode operation)
By default the handler will check whether the resource exist before calling @{link #executeRuntimeStep(OperationContext, ModelNode)}.
|
public void execute(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
OperationContext.Stage.RUNTIME step that calls
executeRuntimeStep(OperationContext, ModelNode).
Execute this step. If the operation fails, context.getFailureDescription()
must be called, before calling one of the
context.completeStep variants,
or an OperationFailedException must be thrown.
If the operation succeeded, context.getResult() should
be called and the result populated with the outcome, after which one of the
context.completeStep variants
must be called.
When this method is invoked the thread context classloader will
be set to be the defining class loader of the class that implements this interface.
execute in interface OperationStepHandlercontext - the operation contextoperation - the operation being executedOperationFailedException - if the operation failed before calling context.completeStep()protected boolean resourceMustExist(OperationContext context, org.jboss.dmr.ModelNode operation)
context - the operation contextoperation - the operation being executedprotected abstract void executeRuntimeStep(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
OperationContext.Stage.RUNTIME.
If the operation fails, context.getFailureDescroption()
must be called, or OperationFailedException must be thrown, before calling one of the
context.completeStep variants.
If the operation succeeded, context.getResult() should
be called and the result populated with the outcome, after which one of the
context.completeStep variants
must be called.context - the operation contextoperation - the operation being executedOperationFailedException - if the operation failed before calling context.completeStep()Copyright © 2014 JBoss by Red Hat. All rights reserved.