public abstract class ThreadsWriteAttributeOperationHandler extends AbstractWriteAttributeHandler<Boolean>
AbstractWriteAttributeHandler.HandbackHolder<T>| Modifier and Type | Field and Description |
|---|---|
protected AttributeDefinition[] |
attributes |
protected Map<String,AttributeDefinition> |
runtimeAttributes |
| Constructor and Description |
|---|
ThreadsWriteAttributeOperationHandler(AttributeDefinition[] attributes,
AttributeDefinition[] runtimeAttributes)
Creates a handler that doesn't validate values.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
applyOperation(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.msc.service.ServiceController<?> service,
boolean forRollback) |
protected boolean |
applyUpdateToRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.dmr.ModelNode newValue,
org.jboss.dmr.ModelNode currentValue,
AbstractWriteAttributeHandler.HandbackHolder<Boolean> handbackHolder)
Hook to allow subclasses to make runtime changes to effect the attribute value change.
|
protected abstract org.jboss.msc.service.ServiceController<?> |
getService(OperationContext context,
org.jboss.dmr.ModelNode model) |
void |
registerAttributes(ManagementResourceRegistration registry) |
protected void |
revertUpdateToRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.dmr.ModelNode valueToRestore,
org.jboss.dmr.ModelNode valueToRevert,
Boolean handback)
Hook to allow subclasses to revert runtime changes made in
AbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder). |
execute, finishModelStage, getAttributeDefinition, requiresRuntime, validateResolvedValue, validateUnresolvedValue, validateUpdatedModelprotected final AttributeDefinition[] attributes
protected final Map<String,AttributeDefinition> runtimeAttributes
public ThreadsWriteAttributeOperationHandler(AttributeDefinition[] attributes, AttributeDefinition[] runtimeAttributes)
attributes - all persistent attributes of theruntimeAttributes - attributes whose updated value can immediately be applied to the runtimeprotected boolean applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Boolean> handbackHolder) throws OperationFailedException
AbstractWriteAttributeHandlerapplyUpdateToRuntime in class AbstractWriteAttributeHandler<Boolean>context - the context of the operationoperation - the operationattributeName - the name of the attribute being modifiednewValue - the new value for the attribute, after ModelNode.resolve() has been called on itcurrentValue - the existing value for the attributehandbackHolder - holder for an arbitrary object to pass to
AbstractWriteAttributeHandler.revertUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, Object) if
the operation needs to be rolled backtrue if the server requires reload to effect the attribute
value change; false if notOperationFailedExceptionprotected void revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert, Boolean handback) throws OperationFailedException
AbstractWriteAttributeHandlerAbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder).revertUpdateToRuntime in class AbstractWriteAttributeHandler<Boolean>context - the context of the operationoperation - the operationattributeName - the name of the attribute being modifiedvalueToRestore - the previous value for the attribute, before this operation was executedvalueToRevert - the new value for the attribute that should be revertedhandback - an object, if any, passed in to the handbackHolder by the applyUpdateToRuntime
implementationOperationFailedExceptionpublic void registerAttributes(ManagementResourceRegistration registry)
protected abstract org.jboss.msc.service.ServiceController<?> getService(OperationContext context, org.jboss.dmr.ModelNode model) throws OperationFailedException
OperationFailedExceptionprotected abstract void applyOperation(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.msc.service.ServiceController<?> service, boolean forRollback) throws OperationFailedException
OperationFailedExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.