Class FolderComputation<I extends TopLevelItem>
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
com.cloudbees.hudson.plugins.folder.computed.FolderComputation<I>
- All Implemented Interfaces:
ModelObject,Queue.Executable,Saveable,SearchableModelObject,SearchItem,Runnable,Loadable,ModelObjectWithContextMenu
public class FolderComputation<I extends TopLevelItem>
extends Actionable
implements Queue.Executable, Saveable, Loadable
A particular “run” of
ComputedFolder.- Since:
- 4.11-beta-1
-
Nested Class Summary
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AlternativeUiTextProvider.Message<FolderComputation>Allow other code to override the display name forFolderComputation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFolderComputation(ComputedFolder<I> folder, FolderComputation<I> previous) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoConsoleText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Sends out the raw console output.org.kohsuke.stapler.HttpResponsedoStop()Stops this build if it's still going.protected XmlFilelongReturns an input stream that reads from the log file.getUrl()booleanbooleanvoidload()voidrun()voidsave()toString()voidwriteLogTo(long offset, org.apache.commons.jelly.XMLOutput out) voidMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.model.Queue.Executable
getParentExecutable
-
Field Details
-
DISPLAY_NAME
Allow other code to override the display name forFolderComputation.
-
-
Constructor Details
-
FolderComputation
protected FolderComputation(@NonNull ComputedFolder<I> folder, @CheckForNull FolderComputation<I> previous)
-
-
Method Details
-
run
public void run()- Specified by:
runin interfaceQueue.Executable- Specified by:
runin interfaceRunnable
-
save
- Specified by:
savein interfaceSaveable- Throws:
IOException
-
load
- Specified by:
loadin interfaceLoadable- Throws:
IOException
-
getLogFile
-
getEventsFile
-
createEventsListener
@WithBridgeMethods(hudson.model.TaskListener.class) @NonNull public StreamTaskListener createEventsListener() -
getDataFile
-
getCauses
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
getSearchUrl
- Specified by:
getSearchUrlin interfaceSearchItem
-
getParent
- Specified by:
getParentin interfaceQueue.Executable
-
getEstimatedDuration
public long getEstimatedDuration()- Specified by:
getEstimatedDurationin interfaceQueue.Executable
-
isBuilding
public boolean isBuilding() -
isLogUpdated
public boolean isLogUpdated() -
getLogText
-
getEventsText
-
writeLogTo
- Throws:
IOException
-
writeWholeLogTo
- Throws:
IOExceptionInterruptedException
-
doConsoleText
public void doConsoleText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException Sends out the raw console output.- Parameters:
req- the requestrsp- the response.- Throws:
IOException- if things go wrong.
-
doStop
Stops this build if it's still going.- Returns:
- the Http response.
- Throws:
IOExceptionjavax.servlet.ServletException
-
getLogInputStream
Returns an input stream that reads from the log file. It will use a gzip-compressed log file (log.gz) if that exists.- Returns:
- An input stream from the log file. If the log file does not exist, the error message will be returned to the output.
- Throws:
IOException- if things go wrong
-
getResult
-
getTimestamp
-
getDurationString
-
getUrl
-
getPreviousResult
-
getIconColor
-
getBuildStatusIconClassName
-
toString
- Specified by:
toStringin interfaceQueue.Executable- Overrides:
toStringin classObject
-