Package org.jboss.as.logging
Class LoggingOperations.LoggingWriteAttributeHandler
- java.lang.Object
-
- org.jboss.as.controller.AbstractWriteAttributeHandler<ConfigurationPersistence>
-
- org.jboss.as.logging.LoggingOperations.LoggingWriteAttributeHandler
-
- All Implemented Interfaces:
OperationStepHandler
- Enclosing class:
- LoggingOperations
public abstract static class LoggingOperations.LoggingWriteAttributeHandler extends AbstractWriteAttributeHandler<ConfigurationPersistence>
A default log handler write attribute step handler.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
AbstractWriteAttributeHandler.HandbackHolder<T extends Object>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLoggingWriteAttributeHandler(AttributeDefinition[] attributes)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected OperationStepHandlerafterPrepare(org.jboss.logmanager.config.LogContextConfiguration logContextConfiguration, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue)AnOperationStepHandlero register after the prepare has been executed.protected abstract booleanapplyUpdate(OperationContext context, String attributeName, String addressName, org.jboss.dmr.ModelNode value, org.jboss.logmanager.config.LogContextConfiguration logContextConfiguration)Applies the update to the runtime.protected booleanapplyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<ConfigurationPersistence> handbackHolder)AttributeDefinition[]getAttributes()Returns a collection of attributes used for the write attribute.protected voidrevertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert, ConfigurationPersistence configurationPersistence)protected voidvalidateUpdatedModel(OperationContext context, Resource model)-
Methods inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
execute, finishModelStage, getAttributeDefinition, recordCapabilitiesAndRequirements, requiresRuntime
-
-
-
-
Constructor Detail
-
LoggingWriteAttributeHandler
protected LoggingWriteAttributeHandler(AttributeDefinition[] attributes)
-
-
Method Detail
-
applyUpdateToRuntime
protected final boolean applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<ConfigurationPersistence> handbackHolder) throws OperationFailedException
- Specified by:
applyUpdateToRuntimein classAbstractWriteAttributeHandler<ConfigurationPersistence>- Throws:
OperationFailedException
-
afterPrepare
protected OperationStepHandler afterPrepare(org.jboss.logmanager.config.LogContextConfiguration logContextConfiguration, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue)
AnOperationStepHandlero register after the prepare has been executed.If applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder) returns
truethis step will not be registered.- Parameters:
logContextConfiguration- the log context configuration usedattributeName- the name of the attribute being writtencurrentValue- the current value of the attributeresolvedValue- the resolved value of the attribute- Returns:
- an operation step handler to register or
nullto not register a step
-
applyUpdate
protected abstract boolean applyUpdate(OperationContext context, String attributeName, String addressName, org.jboss.dmr.ModelNode value, org.jboss.logmanager.config.LogContextConfiguration logContextConfiguration) throws OperationFailedException
Applies the update to the runtime.- Parameters:
context- the operation contextattributeName- the name of the attribute being writtenaddressName- the name of the handler or loggervalue- the value to set the attribute tologContextConfiguration- the log context configuration- Returns:
trueif a restart is required, otherwisefalse- Throws:
OperationFailedException- if an error occurs
-
revertUpdateToRuntime
protected void revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert, ConfigurationPersistence configurationPersistence) throws OperationFailedException
- Specified by:
revertUpdateToRuntimein classAbstractWriteAttributeHandler<ConfigurationPersistence>- Throws:
OperationFailedException
-
validateUpdatedModel
protected void validateUpdatedModel(OperationContext context, Resource model) throws OperationFailedException
- Overrides:
validateUpdatedModelin classAbstractWriteAttributeHandler<ConfigurationPersistence>- Throws:
OperationFailedException
-
getAttributes
public final AttributeDefinition[] getAttributes()
Returns a collection of attributes used for the write attribute.- Returns:
- a collection of attributes
-
-