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 . |
void |
waitFor(org.jboss.msc.service.ServiceController<?> controller)
Wait for the required service to start up and fail otherwise.
|
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.getFailureDescroption()
must be called, or OperationFailedException
must be thrown, before calling context.completeStep()
.
If the operation succeeded, context.getResult()
should
be called and the result populated with the outcome, after which context.completeStep()
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 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 context.completeStep()
.
If the operation succeeded, context.getResult()
should
be called and the result populated with the outcome, after which context.completeStep()
must be called.context
- the operation contextoperation
- the operation being executedOperationFailedException
- if the operation failed before calling context.completeStep()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.