Class InterfaceAddHandler
- java.lang.Object
-
- org.jboss.as.controller.AbstractAddStepHandler
-
- org.jboss.as.controller.operations.common.InterfaceAddHandler
-
- All Implemented Interfaces:
OperationDescriptor
,OperationStepHandler
public class InterfaceAddHandler extends AbstractAddStepHandler
Handler for the interface resource add operation.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc., Emanuel Muckenhuber
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.as.controller.AbstractAddStepHandler
AbstractAddStepHandler.Parameters
-
-
Field Summary
-
Fields inherited from class org.jboss.as.controller.AbstractAddStepHandler
attributes
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
InterfaceAddHandler(boolean specified)
Create the InterfaceAddHandler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ParsedInterfaceCriteria
getCriteria(OperationContext context, org.jboss.dmr.ModelNode operation)
protected void
performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model)
Make any runtime changes necessary to effect the changes indicated by the givenoperation
.protected void
performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, String name, ParsedInterfaceCriteria criteria)
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 void
validateAndSet(AttributeDefinition definition, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode subModel)
-
Methods inherited from class org.jboss.as.controller.AbstractAddStepHandler
createResource, createResource, execute, getAttributes, performRuntime, populateModel, populateModel, recordCapabilitiesAndRequirements, requiresRuntime, rollbackRuntime
-
-
-
-
Method Detail
-
populateModel
protected void populateModel(org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException
Description copied from class:AbstractAddStepHandler
Populate the given node in the persistent configuration model based on the values in the given operation. This method is invoked duringOperationContext.Stage.MODEL
.This default implementation invokes
AttributeDefinition.validateAndSet(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)
on any attributes passed to the constructor.- Overrides:
populateModel
in classAbstractAddStepHandler
- Parameters:
operation
- the operationmodel
- persistent configuration model node that corresponds to the address ofoperation
- Throws:
OperationFailedException
- ifoperation
is invalid or populating the model otherwise fails
-
validateAndSet
protected void validateAndSet(AttributeDefinition definition, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode subModel) throws OperationFailedException
- Throws:
OperationFailedException
-
performRuntime
protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException
Description copied from class:AbstractAddStepHandler
Make any runtime changes necessary to effect the changes indicated by the givenoperation
. Executes afterAbstractAddStepHandler.populateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)
, so the givenresource
parameter will reflect any changes made in that method. This method is invoked duringOperationContext.Stage.RUNTIME
. Subclasses that wish to make changes to runtime services should override this method or theAbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)
variant.- Overrides:
performRuntime
in classAbstractAddStepHandler
- Parameters:
context
- the operation contextoperation
- the operation being executedmodel
- persistent configuration model from the resource that corresponds to the address ofoperation
- Throws:
OperationFailedException
- ifoperation
is invalid or updating the runtime otherwise fails
-
getCriteria
protected ParsedInterfaceCriteria getCriteria(OperationContext context, org.jboss.dmr.ModelNode operation)
-
performRuntime
protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, String name, ParsedInterfaceCriteria criteria)
-
-