Class PathInfoHandler
- java.lang.Object
-
- org.jboss.as.controller.AbstractRuntimeOnlyHandler
-
- org.jboss.as.controller.services.path.PathInfoHandler
-
- All Implemented Interfaces:
OperationStepHandler
public class PathInfoHandler extends AbstractRuntimeOnlyHandler
Handler for file usage metric which contains the total size of a folder and the usable space (as in Java nio).- Author:
- Emmanuel Hugonnet (c) 2015 Red Hat, inc.
- See Also:
FileStore.getUsableSpace()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPathInfoHandler.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecuteRuntimeStep(OperationContext context, org.jboss.dmr.ModelNode operation)Compute the file usage metric which contains the total size of a folder and the usable space (as in Java nio).static voidregisterOperation(ManagementResourceRegistration resourceRegistration, PathInfoHandler handler)protected booleanrequiresRuntime(OperationContext context)Gets whether theOperationContext.Stage.RUNTIMEstep should be added to callAbstractRuntimeOnlyHandler.executeRuntimeStep(OperationContext, ModelNode).-
Methods inherited from class org.jboss.as.controller.AbstractRuntimeOnlyHandler
execute, resourceMustExist
-
-
-
-
Method Detail
-
requiresRuntime
protected boolean requiresRuntime(OperationContext context)
Description copied from class:AbstractRuntimeOnlyHandlerGets whether theOperationContext.Stage.RUNTIMEstep should be added to callAbstractRuntimeOnlyHandler.executeRuntimeStep(OperationContext, ModelNode). This default implementation will returntruefor a normal server running in normal (non admin-only) mode. If running on a host controller, it will returntrueif it is the active copy of the host controller subsystem. Subclasses that perform no runtime update could override and returnfalse. This method is invoked duringOperationContext.Stage.MODEL.- Overrides:
requiresRuntimein classAbstractRuntimeOnlyHandler- Parameters:
context- operation context- Returns:
trueif a step to invokeexecuteRuntimeStepshould be added;falseotherwise.- See Also:
OperationContext.isDefaultRequiresRuntime()
-
executeRuntimeStep
protected void executeRuntimeStep(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
Compute the file usage metric which contains the total size of a folder and the usable space (as in Java nio).- Specified by:
executeRuntimeStepin classAbstractRuntimeOnlyHandler- Parameters:
context- the operation contextoperation- the operation being executed- Throws:
OperationFailedException- See Also:
FileStore.getUsableSpace()
-
registerOperation
public static void registerOperation(ManagementResourceRegistration resourceRegistration, PathInfoHandler handler)
-
-