public class SecurityRealmChildRemoveHandler extends RestartParentResourceHandlerBase
Constructor and Description |
---|
SecurityRealmChildRemoveHandler(boolean validateAuthentication) |
Modifier and Type | Method and Description |
---|---|
protected org.jboss.msc.service.ServiceName |
getParentServiceName(PathAddress parentAddress)
Gets the name of the parent service.
|
protected boolean |
isResourceServiceRestartAllowed(OperationContext context,
org.jboss.msc.service.ServiceController<?> service)
Gets whether a restart of the parent resource's services is allowed.
|
protected void |
recreateParentService(OperationContext context,
PathAddress parentAddress,
org.jboss.dmr.ModelNode parentModel)
Recreate the parent service(s) using the given model.
|
protected void |
removeServices(OperationContext context,
org.jboss.msc.service.ServiceName parentService,
org.jboss.dmr.ModelNode parentModel)
Removes services.
|
protected boolean |
requiresRuntime(OperationContext context)
Gets whether this operation needs to update the runtime.
|
protected void |
updateModel(OperationContext context,
org.jboss.dmr.ModelNode operation)
Performs the update to the persistent configuration model.
|
execute, getParentAddress, recreateParentService
public SecurityRealmChildRemoveHandler(boolean validateAuthentication)
protected void updateModel(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
RestartParentResourceHandlerBase
updateModel
in class RestartParentResourceHandlerBase
context
- the operation contextoperation
- the operationOperationFailedException
- if there is a problem updating the modelprotected boolean requiresRuntime(OperationContext context)
RestartParentResourceHandlerBase
true
if the process type
is not ProcessType.HOST_CONTROLLER
.requiresRuntime
in class RestartParentResourceHandlerBase
context
- the operation contexttrue
if the operation should update the runtime; false
if it only updates the configuration
modelprotected boolean isResourceServiceRestartAllowed(OperationContext context, org.jboss.msc.service.ServiceController<?> service)
RestartParentResourceHandlerBase
the context allows resource service restarts
;
subclasses could also check the state of the service
.isResourceServiceRestartAllowed
in class RestartParentResourceHandlerBase
context
- the operation contextservice
- the parent servicetrue
if a restart is allowed; false
protected void removeServices(OperationContext context, org.jboss.msc.service.ServiceName parentService, org.jboss.dmr.ModelNode parentModel) throws OperationFailedException
RestartParentResourceHandlerBase
instructs the context to remove the parentService
.
Subclasses could use the provided parentModel
to identify and remove other services.removeServices
in class RestartParentResourceHandlerBase
context
- the operation contextparentService
- the name of the parent serviceparentModel
- the model associated with the parent resource, including nodes for any child resourcesOperationFailedException
- if there is a problem removing the servicesprotected void recreateParentService(OperationContext context, PathAddress parentAddress, org.jboss.dmr.ModelNode parentModel) throws OperationFailedException
RestartParentResourceHandlerBase
To provide compatible behavior with previous releases, this default implementation calls the deprecated
RestartParentResourceHandlerBase.recreateParentService(OperationContext, PathAddress, org.jboss.dmr.ModelNode, ServiceVerificationHandler)
method. It then does nothing with the objects referenced by the verificationHandler
parameter passed to
that method. Subclasses that overrode that method are encouraged to instead override this one.
Subclasses that override this method should not callsuper.recreateParentService(...)
.
recreateParentService
in class RestartParentResourceHandlerBase
context
- the operation contextparentAddress
- the address of the parent resourceparentModel
- the current configuration model for the parent resource and its childrenOperationFailedException
- if there is a problem installing the servicesprotected org.jboss.msc.service.ServiceName getParentServiceName(PathAddress parentAddress)
RestartParentResourceHandlerBase
getParentServiceName
in class RestartParentResourceHandlerBase
parentAddress
- the address of the parent resourceCopyright © 2023 JBoss by Red Hat. All rights reserved.