public class NativeManagementAddHandler extends AbstractAddStepHandler
AbstractAddStepHandler.Parameters
Modifier and Type | Field and Description |
---|---|
static String |
OPERATION_NAME |
attributes
Constructor and Description |
---|
NativeManagementAddHandler(LocalHostControllerInfoImpl hostControllerInfo) |
Modifier and Type | Method and Description |
---|---|
static void |
installNativeManagementServices(org.jboss.msc.service.ServiceTarget serviceTarget,
LocalHostControllerInfo hostControllerInfo,
org.xnio.OptionMap options) |
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 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, createResource, execute, performRuntime, performRuntime, populateModel, populateModel, populateModel, recordCapabilitiesAndRequirements, requiresRuntimeVerification, rollbackRuntime, rollbackRuntime
public static final String OPERATION_NAME
public NativeManagementAddHandler(LocalHostControllerInfoImpl hostControllerInfo)
protected 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.protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException
AbstractAddStepHandler
operation
. Executes
after AbstractAddStepHandler.populateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)
, so the given resource
parameter will reflect any changes made in that method. This method is
invoked during OperationContext.Stage.RUNTIME
. Subclasses that wish to make
changes to runtime services should override this method or the
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)
variant.
To provide compatible behavior with previous releases, this default implementation calls the deprecated
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, ServiceVerificationHandler, java.util.List)
method. It then does nothing with the objects referenced by the verificationHandler
and
controllers
parameters passed to that method. Subclasses that overrode that method are encouraged to
instead override this one or the AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)
variant. Subclasses that override this method should not callsuper.performRuntime(...)
.
performRuntime
in class AbstractAddStepHandler
context
- the operation contextoperation
- the operation being executedmodel
- persistent configuration model from the resource that corresponds to the address of operation
OperationFailedException
- if operation
is invalid or updating the runtime otherwise failspublic static void installNativeManagementServices(org.jboss.msc.service.ServiceTarget serviceTarget, LocalHostControllerInfo hostControllerInfo, org.xnio.OptionMap options)
Copyright © 2023 JBoss by Red Hat. All rights reserved.