Package jenkins.management
Class AsynchronousAdministrativeMonitor
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.AdministrativeMonitor
jenkins.management.AsynchronousAdministrativeMonitor
- All Implemented Interfaces:
ExtensionPoint,ModelObject,SearchableModelObject,SearchItem,org.kohsuke.stapler.StaplerProxy
Convenient partial implementation of
AdministrativeMonitor that involves a background "fixing" action
once the user opts in for the execution of it.
A subclass defines what that background fixing actually does in fix(TaskListener). The logging output
from it gets persisted, and this class provides a "/log" view that allows the administrator to monitor its progress.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.AdministrativeMonitor
id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidfix(TaskListener listener) Run on a separate thread in the background to fix up stuff.protected Fileabstract Stringprotected FileRewrite log file.Used to URL-bindAnnotatedLargeText.booleanIs there an active execution process going on?protected Threadstart(boolean forceRestart) Starts the background fixing activity.Methods inherited from class hudson.model.AdministrativeMonitor
all, checkRequiredPermission, disable, doDisable, getRequiredPermission, getSearchUrl, getTarget, getUrl, hasPermissionToDisplay, hasRequiredPermission, isActivated, isActivationFake, isEnabled, isSecurityMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Constructor Details
-
AsynchronousAdministrativeMonitor
public AsynchronousAdministrativeMonitor()
-
-
Method Details
-
isFixingActive
public boolean isFixingActive()Is there an active execution process going on? -
getLogText
Used to URL-bindAnnotatedLargeText. -
getLogFile
Rewrite log file. -
getBaseDir
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classAdministrativeMonitor
-
start
Starts the background fixing activity.- Parameters:
forceRestart- If true, any ongoing fixing activity gets interrupted and the new one starts right away.
-
fix
Run on a separate thread in the background to fix up stuff.- Throws:
Exception
-