public class SecurityRealmChildWriteAttributeHandler extends RestartParentWriteAttributeHandler
AbstractWriteAttributeHandler.HandbackHolder<T>
Constructor and Description |
---|
SecurityRealmChildWriteAttributeHandler(AttributeDefinition... attributes) |
Modifier and Type | Method and Description |
---|---|
protected org.jboss.msc.service.ServiceName |
getParentServiceName(PathAddress parentAddress) |
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,
ServiceVerificationHandler verificationHandler) |
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 a
OperationContext.Stage.RUNTIME handler should be added. |
applyUpdateToRuntime, getParentAddress, revertUpdateToRuntime
execute, finishModelStage, getAttributeDefinition, validateResolvedValue, validateUnresolvedValue, validateUpdatedModel
public SecurityRealmChildWriteAttributeHandler(AttributeDefinition... attributes)
protected boolean requiresRuntime(OperationContext context)
AbstractWriteAttributeHandler
OperationContext.Stage.RUNTIME
handler should be added. This default implementation
returns true if the process is a normal server
and the process
is not booting
. The rationale for the latter check is if the process is
booting, the resource being modified will have been added as a previous step in the same context, and
the Stage.RUNTIME handling for that add will see a model the reflects the changes made by this handler and
will apply them to the runtime.requiresRuntime
in class AbstractWriteAttributeHandler<org.jboss.dmr.ModelNode>
context
- operation contexttrue
if a runtime stage handler should be added; false
otherwise.protected boolean isResourceServiceRestartAllowed(OperationContext context, org.jboss.msc.service.ServiceController<?> service)
RestartParentWriteAttributeHandler
the context allows resource service restarts
;
subclasses could also check the state of the service
.isResourceServiceRestartAllowed
in class RestartParentWriteAttributeHandler
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
RestartParentWriteAttributeHandler
instructs the context to remove the parentService
.
Subclasses could use the provided parentModel
to identify and remove other services.removeServices
in class RestartParentWriteAttributeHandler
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, ServiceVerificationHandler verificationHandler) throws OperationFailedException
recreateParentService
in class RestartParentWriteAttributeHandler
OperationFailedException
protected org.jboss.msc.service.ServiceName getParentServiceName(PathAddress parentAddress)
getParentServiceName
in class RestartParentWriteAttributeHandler
Copyright © 2015 JBoss by Red Hat. All rights reserved.