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
,WithConsoleUrl
,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
Modifier and TypeFieldDescriptionstatic final AlternativeUiTextProvider.Message<FolderComputation>
Allow other code to override the display name forFolderComputation
. -
Constructor Summary
ModifierConstructorDescriptionprotected
FolderComputation
(ComputedFolder<I> folder, FolderComputation<I> previous) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doConsoleText
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Sends out the raw console output.org.kohsuke.stapler.HttpResponse
doStop()
Stops this build if it's still going.protected XmlFile
long
Returns an input stream that reads from the log file.getUrl()
boolean
boolean
void
load()
void
run()
void
save()
toString()
void
writeLogTo
(long offset, org.apache.commons.jelly.XMLOutput out) void
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hudson.model.Queue.Executable
getConsoleUrl, 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:
run
in interfaceQueue.Executable
- Specified by:
run
in interfaceRunnable
-
save
- Specified by:
save
in interfaceSaveable
- Throws:
IOException
-
load
- Specified by:
load
in interfaceLoadable
- Throws:
IOException
-
getLogFile
-
getEventsFile
-
createEventsListener
@WithBridgeMethods(hudson.model.TaskListener.class) @NonNull public StreamTaskListener createEventsListener() -
getDataFile
-
getCauses
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-
getSearchUrl
- Specified by:
getSearchUrl
in interfaceSearchItem
-
getParent
- Specified by:
getParent
in interfaceQueue.Executable
-
getEstimatedDuration
public long getEstimatedDuration()- Specified by:
getEstimatedDuration
in interfaceQueue.Executable
-
isBuilding
public boolean isBuilding() -
isLogUpdated
public boolean isLogUpdated() -
getLogText
-
getEventsText
-
writeLogTo
- Throws:
IOException
-
writeWholeLogTo
- Throws:
IOException
InterruptedException
-
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:
IOException
javax.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:
toString
in interfaceQueue.Executable
- Overrides:
toString
in classObject
-