public abstract class AbstractDataSourceAdd extends AbstractAddStepHandler
attributes
Constructor and Description |
---|
AbstractDataSourceAdd() |
Modifier and Type | Method and Description |
---|---|
protected abstract AbstractDataSourceService |
createDataSourceService(String jndiName) |
void |
execute(OperationContext context,
org.jboss.dmr.ModelNode operation)
Overrides superclass method to pass the full
Resource into the runtime handling logic. |
protected void |
performRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model,
ServiceVerificationHandler verificationHandler,
List<org.jboss.msc.service.ServiceController<?>> newControllers)
Method is
final , and throws unsupported operation exception to prevent subclasses inadvertently
overridding it. |
protected abstract void |
populateModel(org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
Populate the given node in the persistent configuration model based on the values in the given operation.
|
protected abstract void |
startConfigAndAddDependency(org.jboss.msc.service.ServiceBuilder<?> dataSourceServiceBuilder,
AbstractDataSourceService dataSourceService,
String jndiName,
org.jboss.msc.service.ServiceTarget serviceTarget,
org.jboss.dmr.ModelNode operation,
ServiceVerificationHandler serviceVerificationHandler) |
createResource, populateModel, populateModel, requiresRuntime, requiresRuntimeVerification, rollbackRuntime
public void execute(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
Resource
into the runtime handling logic.
{@inheritDocexecute
in interface OperationStepHandler
execute
in class AbstractAddStepHandler
context
- the operation contextoperation
- the operation being executedOperationFailedException
- if the operation failed before calling context.completeStep()
protected final 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
final
, and throws unsupported operation exception to prevent subclasses inadvertently
overridding it.
Make any runtime changes necessary to effect the changes indicated by the given operation
. Executes
after AbstractAddStepHandler.populateModel(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.
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 startConfigAndAddDependency(org.jboss.msc.service.ServiceBuilder<?> dataSourceServiceBuilder, AbstractDataSourceService dataSourceService, String jndiName, org.jboss.msc.service.ServiceTarget serviceTarget, org.jboss.dmr.ModelNode operation, ServiceVerificationHandler serviceVerificationHandler) throws OperationFailedException
OperationFailedException
protected abstract void populateModel(org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException
AbstractAddStepHandler
populateModel
in class AbstractAddStepHandler
operation
- the operationmodel
- persistent configuration model node that corresponds to the address of operation
OperationFailedException
- if operation
is invalid or populating the model otherwise failsprotected abstract AbstractDataSourceService createDataSourceService(String jndiName) throws OperationFailedException
OperationFailedException
Copyright © 2014 JBoss by Red Hat. All rights reserved.