public abstract class AbstractBoottimeAddStepHandler extends AbstractAddStepHandler
OperationStepHandler
implementations that add managed resource and also perform runtime
processing that should only occur during server boot. An example of such processing would be installing a
deployment unit processor.
Do not extend this class for operations that can run after server boot. Typically it should only be extended for operations that add a deployment unit processor.
If an operation handled via an extension of this class is executed on a server after boot, the server's persistent
configuration model will be updated, but the
performBoottime
method will not be invoked. Instead the server will be put into "reload required" state
.
Constructor and Description |
---|
AbstractBoottimeAddStepHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
performBoottime(OperationContext context,
org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model,
ServiceVerificationHandler verificationHandler,
List<org.jboss.msc.service.ServiceController<?>> newControllers)
Make any runtime changes necessary to effect the changes indicated by the given
operation . |
protected void |
performRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model,
ServiceVerificationHandler verificationHandler,
List<org.jboss.msc.service.ServiceController<?>> newControllers)
|
protected void |
rollbackRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model,
List<org.jboss.msc.service.ServiceController<?>> controllers)
Overrides the superclass to additionally call
OperationContext.revertReloadRequired()
if OperationContext.isBooting() returns false . |
execute, populateModel, populateModel, populateModel, requiresRuntime, requiresRuntimeVerification
protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, ServiceVerificationHandler verificationHandler, List<org.jboss.msc.service.ServiceController<?>> newControllers) throws OperationFailedException
OperationContext.isBooting()
returns true
, invokes
performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, ServiceVerificationHandler, java.util.List)
,
else invokes OperationContext.reloadRequired()
.performRuntime
in class AbstractAddStepHandler
context
- the operation contextoperation
- the operation being executedmodel
- persistent configuration model node that corresponds to the address of operation
verificationHandler
- step handler that can be added as a listener to any new services installed in order to
validate the services installed correctly during the
VERIFY stage
newControllers
- holder for the ServiceController
for any new services installed by the method. The
method should add the ServiceController
for any new services to this list. If the
overall operation needs to be rolled back, the list will be used in
AbstractAddStepHandler.rollbackRuntime(OperationContext, ModelNode, ModelNode, java.util.List)
to automatically removed
the newly added servicesOperationFailedException
- if operation
is invalid or updating the runtime otherwise failsprotected abstract void performBoottime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, ServiceVerificationHandler verificationHandler, List<org.jboss.msc.service.ServiceController<?>> newControllers) throws OperationFailedException
operation
. Will only be
invoked if OperationContext.isBooting()
returns true
.context
- the operation contextoperation
- the operation being executedmodel
- persistent configuration model node that corresponds to the address of operation
verificationHandler
- step handler that can be added as a listener to any new services installed in order to
validate the services installed correctly during the
VERIFY stage
newControllers
- holder for the ServiceController
for any new services installed by the method. The
method should add the ServiceController
for any new services to this list. If the
overall operation needs to be rolled back, the list will be used in
rollbackRuntime(OperationContext, ModelNode, ModelNode, java.util.List)
to automatically removed
the newly added servicesOperationFailedException
- if operation
is invalid or updating the runtime otherwise failsprotected void rollbackRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, List<org.jboss.msc.service.ServiceController<?>> controllers)
OperationContext.revertReloadRequired()
if OperationContext.isBooting()
returns false
.rollbackRuntime
in class AbstractAddStepHandler
context
- the operation contextoperation
- the operation being executedmodel
- persistent configuration model node that corresponds to the address of operation
controllers
- holder for the ServiceController
for any new services installed by
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, ServiceVerificationHandler, java.util.List)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.