public class ServerAddHandler extends AbstractAddStepHandler
OperationHandler
adding a new server configuration.AbstractAddStepHandler.Parameters
Modifier and Type | Field and Description |
---|---|
static String |
OPERATION_NAME |
attributes
Modifier and Type | Method and Description |
---|---|
static ServerAddHandler |
create(LocalHostControllerInfo hostControllerInfo,
ServerInventory serverInventory,
ControlledProcessState processState,
File domainDataDir) |
protected Resource |
createResource(OperationContext context)
Create the
Resource that the AbstractAddStepHandler.execute(OperationContext, ModelNode)
method operates on. |
protected void |
populateModel(OperationContext context,
org.jboss.dmr.ModelNode operation,
Resource resource)
Populate the given resource in the persistent configuration model based on the values in the given operation.
|
protected boolean |
requiresRuntime(OperationContext context)
Gets whether a
OperationContext.Stage.RUNTIME step should be added to call
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource) }. |
createResource, execute, performRuntime, performRuntime, performRuntime, populateModel, populateModel, recordCapabilitiesAndRequirements, requiresRuntimeVerification, rollbackRuntime, rollbackRuntime
public static final String OPERATION_NAME
public static ServerAddHandler create(LocalHostControllerInfo hostControllerInfo, ServerInventory serverInventory, ControlledProcessState processState, File domainDataDir)
protected Resource createResource(OperationContext context)
AbstractAddStepHandler
Resource
that the AbstractAddStepHandler.execute(OperationContext, ModelNode)
method operates on. This method is invoked during OperationContext.Stage.MODEL
.
This default implementation uses the default resource creation facility exposed by the context
. Subclasses wishing to create a custom resource
type can override this method.
createResource
in class AbstractAddStepHandler
context
- the operation contextprotected void populateModel(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) throws OperationFailedException
AbstractAddStepHandler
OperationContext.Stage.MODEL
.
This default implementation simply calls AbstractAddStepHandler.populateModel(ModelNode, org.jboss.as.controller.registry.Resource)
.
populateModel
in class AbstractAddStepHandler
context
- the operation contextoperation
- the operationresource
- the resource that corresponds to the address of operation
OperationFailedException
- if operation
is invalid or populating the model otherwise failsprotected boolean requiresRuntime(OperationContext context)
AbstractAddStepHandler
OperationContext.Stage.RUNTIME
step should be added to call
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)
}.
This default implementation will return true
for a normal server running in normal (non admin-only) mode.
If running on a host controller, it will return true
if it is the active copy of the host controller subsystem.
Subclasses that perform no runtime update could override and return false
. This method is
invoked during OperationContext.Stage.MODEL
.requiresRuntime
in class AbstractAddStepHandler
context
- operation contexttrue
if performRuntime
should be invoked; false
otherwise.Copyright © 2023 JBoss by Red Hat. All rights reserved.