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)}.
|
void |
waitFor(org.jboss.msc.service.ServiceController<?> controller)
Deprecated.
this method is unrelated to this class and will be removed in the next major release
|
@Deprecated public void waitFor(org.jboss.msc.service.ServiceController<?> controller) throws OperationFailedException
controller
- the service to wait forOperationFailedException
- if the service is not available, or the thread was interrupted.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 OperationStepHandler
context
- 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.