public abstract class HandlerAddProperties<T extends HandlerService> extends AbstractAddStepHandler
Modifier | Constructor and Description |
---|---|
protected |
HandlerAddProperties(List<? extends AttributeDefinition> attributeDefinitions) |
protected |
HandlerAddProperties(List<String> attributes,
List<? extends AttributeDefinition> attributeDefinitions) |
Modifier and Type | Method and Description |
---|---|
protected void |
copy(String name,
org.jboss.dmr.ModelNode from,
org.jboss.dmr.ModelNode to)
Copies the attribute, represented by the
name parameter, from one ModelNode to another if the
from parameter has the attributed defined. |
protected abstract T |
createHandlerService(OperationContext context,
org.jboss.dmr.ModelNode model) |
Collection<AttributeDefinition> |
getAttributes()
Returns a collection of attributes used for the write attribute.
|
protected void |
performRuntime(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 |
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 |
updateRuntime(OperationContext context,
org.jboss.msc.service.ServiceBuilder<Handler> serviceBuilder,
String name,
T service,
org.jboss.dmr.ModelNode model) |
execute, populateModel, populateModel, requiresRuntime, requiresRuntimeVerification, rollbackRuntime
protected HandlerAddProperties(List<String> attributes, List<? extends AttributeDefinition> attributeDefinitions)
protected HandlerAddProperties(List<? extends AttributeDefinition> attributeDefinitions)
protected final 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 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
AbstractAddStepHandler
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 T createHandlerService(OperationContext context, org.jboss.dmr.ModelNode model) throws OperationFailedException
OperationFailedException
protected abstract void updateRuntime(OperationContext context, org.jboss.msc.service.ServiceBuilder<Handler> serviceBuilder, String name, T service, org.jboss.dmr.ModelNode model) throws OperationFailedException
OperationFailedException
protected void copy(String name, org.jboss.dmr.ModelNode from, org.jboss.dmr.ModelNode to)
name
parameter, from one ModelNode
to another if the
from
parameter has the attributed defined. If the attribute was not defined, nothing happens.name
- the name of the attribute to copy.from
- the model node to copy the value from.to
- the model node to copy the value to.public final Collection<AttributeDefinition> getAttributes()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.