@ExportedBean public abstract class Computer extends Actionable implements AccessControlled, ExecutorListener, DescriptorByNameOwner, org.kohsuke.stapler.StaplerProxy
Executor
s.
Executor
s on one Computer
are transparently interchangeable
(that is the definition of Computer
).
This object is related to Node
but they have some significant differences.
Computer
primarily works as a holder of Executor
s, so
if a Node
is configured (probably temporarily) with 0 executors,
you won't have a Computer
object for it (except for the built-in node,
which always gets its Computer
in case we have no static executors and
we need to run a Queue.FlyweightTask
- see JENKINS-7291 for more discussion.)
Also, even if you remove a Node
, it takes time for the corresponding
Computer
to be removed, if some builds are already in progress on that
node. Or when the node configuration is changed, unaffected Computer
object
remains intact, while all the Node
objects will go away.
This object also serves UI (unlike Node
), and can be used along with
TransientComputerActionFactory
to add Action
s to Computer
s.
Modifier and Type | Class and Description |
---|---|
static class |
Computer.DisplayExecutor
A value class to provide a consistent snapshot view of the state of an executor to avoid race conditions
during rendering of the executors list.
|
static class |
Computer.TerminationRequest
Used to trace requests to terminate a computer.
|
ExtensionPoint.LegacyInstancesAreScopedToHudson
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
Modifier and Type | Field and Description |
---|---|
static Permission |
BUILD |
static Permission |
CONFIGURE |
static Permission |
CONNECT |
static Permission |
CREATE |
static Permission |
DELETE |
static Permission |
DISCONNECT |
static Permission |
EXTENDED_READ |
static Permission[] |
EXTENDED_READ_AND_CONNECT |
protected String |
nodeName
Node object may be created and deleted independently
from this object. |
protected OfflineCause |
offlineCause
Contains info about reason behind computer being offline.
|
static PermissionGroup |
PERMISSIONS |
static boolean |
SKIP_PERMISSION_CHECK
Escape hatch for StaplerProxy-based access control
|
protected Object |
statusChangeLock |
static ExecutorService |
threadPoolForRemoting |
protected List<Action> |
transientActions |
Modifier and Type | Method and Description |
---|---|
protected abstract Future<?> |
_connect(boolean forceReconnect)
Allows implementing-classes to provide an implementation for the connect method.
|
protected void |
_doScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String view) |
void |
addAction(Action a)
Adds a new action.
|
EnvVars |
buildEnvironment(TaskListener listener)
Creates an environment variable override to be used for launching processes on this node.
|
void |
cliConnect(boolean force)
Deprecated.
Implementation of CLI command "connect-node" moved to
ConnectNodeCommand . |
void |
cliDisconnect(String cause)
Deprecated.
Implementation of CLI command "disconnect-node" moved to
DisconnectNodeCommand . |
void |
cliOffline(String cause)
Deprecated.
Implementation of CLI command "offline-node" moved to
OfflineNodeCommand . |
void |
cliOnline()
Deprecated.
Implementation of CLI command "online-node" moved to
OnlineNodeCommand . |
Future<?> |
connect(boolean forceReconnect)
Do the same as
doLaunchSlaveAgent(StaplerRequest, StaplerResponse)
but outside the context of serving a request. |
int |
countBusy()
Returns the number of
Executor s that are doing some work right now. |
int |
countExecutors()
Returns the current size of the executor pool for this computer.
|
int |
countIdle()
Returns the number of idle
Executor s that can start working immediately. |
static Computer |
currentComputer()
Gets the current
Computer that the build is running. |
Future<?> |
disconnect()
Deprecated.
as of 1.320.
Use
disconnect(OfflineCause) and specify the cause. |
Future<?> |
disconnect(OfflineCause cause)
Disconnect this computer.
|
org.kohsuke.stapler.HttpResponse |
doChangeOfflineCause(String offlineMessage) |
void |
doConfigDotXml(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Accepts
config.xml submission, as well as serve it. |
void |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Accepts the update to the node configuration.
|
org.kohsuke.stapler.HttpResponse |
doDoDelete()
Really deletes the agent.
|
void |
doDumpExportTable(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Dumps the contents of the export table.
|
abstract void |
doLaunchSlaveAgent(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
If
getChannel() ==null, attempts to relaunch the agent. |
void |
doProgressiveLog(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Handles incremental log.
|
void |
doRssAll(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
void |
doRssFailed(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
void |
doRssLatest(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Retrieve the RSS feed for the last build for each project executed in this computer.
|
void |
doScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
For system diagnostics.
|
void |
doScriptText(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Run arbitrary Groovy script and return result as plain text.
|
org.kohsuke.stapler.HttpResponse |
doToggleOffline(String offlineMessage) |
ACL |
getACL()
Obtains the ACL associated with this object.
|
List<Action> |
getActions()
Returns the transient
Action s associated with the computer. |
List<Executor> |
getAllExecutors()
Gets the read-only snapshot view of all
Executor instances including OneOffExecutors. |
Api |
getApi() |
Set<LabelAtom> |
getAssignedLabels() |
RunList |
getBuilds() |
String |
getCaption() |
abstract hudson.remoting.VirtualChannel |
getChannel()
Gets the channel that can be used to run a program on this computer.
|
List<ComputerPanelBox> |
getComputerPanelBoxs()
Returns list of all boxes
ComputerPanelBox s. |
long |
getConnectTime()
Gets the time (since epoch) when this computer connected.
|
abstract Charset |
getDefaultCharset()
Gets the default charset of this computer.
|
long |
getDemandStartMilliseconds()
Returns the time when this computer first became in demand.
|
String |
getDescription()
Returns the
Node description for this computer. |
List<Computer.DisplayExecutor> |
getDisplayExecutors()
Used to render the list of executors.
|
String |
getDisplayName() |
EnvVars |
getEnvironment()
Returns cached environment variables (copy to prevent modification) for the JVM on this computer.
|
Map<String,String> |
getEnvVars()
Deprecated.
as of 1.292
Use
getEnvironment() instead. |
List<Executor> |
getExecutors()
Gets the read-only snapshot view of all
Executor s. |
RemotingDiagnostics.HeapDump |
getHeapDump()
Obtains the heap dump.
|
String |
getHostName()
This method tries to compute the name of the host that's reachable by all the other nodes.
|
String |
getIcon()
Returns the icon for this computer.
|
String |
getIconAltText() |
String |
getIconClassName()
Returns the class name that will be used to lookup the icon.
|
long |
getIdleStartMilliseconds()
Returns the time when this computer last became idle.
|
LoadStatistics |
getLoadStatistics() |
String |
getLog()
Gets the string representation of the agent log.
|
protected File |
getLogDir()
Directory where rotated agent logs are stored.
|
File |
getLogFile()
This is where the log from the remote agent goes.
|
abstract List<LogRecord> |
getLogRecords()
Gets the logs recorded by this agent.
|
AnnotatedLargeText<Computer> |
getLogText()
Used to URL-bind
AnnotatedLargeText . |
Map<String,Object> |
getMonitorData()
Expose monitoring data for the remote API.
|
String |
getName()
Returns
the name of the node . |
Node |
getNode()
Returns the
Node that this computer represents. |
int |
getNumExecutors()
Number of
Executor s that are configured for this computer. |
OfflineCause |
getOfflineCause()
If the computer was offline (either temporarily or not),
this method will return the cause.
|
String |
getOfflineCauseReason()
If the computer was offline (either temporarily or not),
this method will return the cause as a string (without user info).
|
List<OneOffExecutor> |
getOneOffExecutors()
Gets the read-only snapshot view of all
OneOffExecutor s. |
abstract RetentionStrategy |
getRetentionStrategy()
RetentionStrategy associated with this computer. |
String |
getSearchUrl()
Returns the URL of this item relative to the parent
SearchItem . |
Map<Object,Object> |
getSystemProperties()
Gets the system properties of the JVM on this computer.
|
Object |
getTarget() |
List<Computer.TerminationRequest> |
getTerminatedBy()
Returns the list of captured termination requests for this Computer.
|
Map<String,String> |
getThreadDump()
Gets the thread dump of the agent JVM.
|
List<AbstractProject> |
getTiedJobs()
Returns projects that are tied on this node.
|
BuildTimelineWidget |
getTimeline() |
String |
getUrl() |
WorkspaceList |
getWorkspaceList()
Gets the object that coordinates the workspace allocation on this computer.
|
void |
interrupt()
Interrupt all
Executor s. |
boolean |
isAcceptingTasks()
Returns
true if the computer is accepting tasks. |
protected boolean |
isAlive()
Returns true if any of the executors are active.
|
abstract boolean |
isConnecting()
Is a
connect(boolean) operation in progress? |
boolean |
isIdle()
Returns true if all the executors of this computer are idle.
|
boolean |
isJnlpAgent()
Deprecated.
since 2008-05-18.
See isLaunchSupported() and ComputerLauncher
|
boolean |
isLaunchSupported()
Returns true if this computer can be launched by Hudson proactively and automatically.
|
boolean |
isManualLaunchAllowed()
This method is called to determine whether manual launching of the agent is allowed at this point in time.
|
boolean |
isOffline() |
boolean |
isOnline() |
boolean |
isPartiallyIdle()
Returns true if this computer has some idle executors that can take more workload.
|
boolean |
isTemporarilyOffline()
Deprecated.
You should almost always want
isOffline() .
This method is marked as deprecated to warn people when they
accidentally call this method. |
abstract Boolean |
isUnix()
True if this computer is a Unix machine (as opposed to Windows machine).
|
protected void |
kill()
Called by
Jenkins.updateComputerList() to notify Computer that it will be discarded. |
void |
launch()
Deprecated.
since 2009-01-06. Use
connect(boolean) |
protected void |
onRemoved()
Called by
Jenkins when this computer is removed. |
void |
recordTermination()
This method captures the information of a request to terminate a computer instance.
|
static void |
relocateOldLogs()
Relocate log files in the old location to the new location.
|
protected void |
removeExecutor(Executor e)
Called by
Executor to kill excessive executors from this computer. |
static Computer |
resolveForCLI(String name)
Used for CLI binding.
|
protected void |
setNode(Node node)
|
void |
setTemporarilyOffline(boolean temporarilyOffline)
Deprecated.
as of 1.320.
Use
setTemporarilyOffline(boolean, OfflineCause) |
void |
setTemporarilyOffline(boolean temporarilyOffline,
OfflineCause cause)
Marks the computer as temporarily offline.
|
void |
updateByXml(InputStream source)
Updates Job by its XML definition.
|
void |
waitUntilOffline() |
void |
waitUntilOnline()
Blocks until the node becomes online/offline.
|
addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
taskAccepted, taskCompleted, taskCompletedWithProblems, taskStarted
getDescriptorByName
protected volatile OfflineCause offlineCause
protected String nodeName
Node
object may be created and deleted independently
from this object.protected final Object statusChangeLock
public static final ExecutorService threadPoolForRemoting
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean SKIP_PERMISSION_CHECK
public static final PermissionGroup PERMISSIONS
public static final Permission CONFIGURE
public static final Permission EXTENDED_READ
public static final Permission DELETE
public static final Permission CREATE
public static final Permission DISCONNECT
public static final Permission CONNECT
public static final Permission BUILD
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final Permission[] EXTENDED_READ_AND_CONNECT
protected Computer(Node node)
public void recordTermination()
AbstractCloudSlave
and Nodes
. In general you should
not need to call this method directly, however if implementing a custom node type or a different path
for removing nodes, it may make sense to call this method in order to capture the originating request.public List<Computer.TerminationRequest> getTerminatedBy()
Executor
to provide details on why a Computer was removed in-between work being scheduled against the Executor
and the Executor
starting to execute the task.Executor.resetWorkUnit(String)
public List<ComputerPanelBox> getComputerPanelBoxs()
ComputerPanelBox
s.@NonNull public List<Action> getActions()
Action
s associated with the computer.getActions
in class Actionable
public void addAction(@NonNull Action a)
Actionable
Actionable.getAllActions()
that happen before calls to this method may not see the update.
Note: this method will always modify the actionsaddAction
in class Actionable
@NonNull public File getLogFile()
getLogDir()
,
relocateOldLogs()
@NonNull protected File getLogDir()
public WorkspaceList getWorkspaceList()
public String getLog() throws IOException
IOException
public AnnotatedLargeText<Computer> getLogText()
AnnotatedLargeText
.@NonNull public ACL getACL()
AccessControlled
getACL
in interface AccessControlled
@Exported public OfflineCause getOfflineCause()
@Exported public String getOfflineCauseReason()
@Nullable public abstract hudson.remoting.VirtualChannel getChannel()
isOffline()
==false.public abstract Charset getDefaultCharset()
isOffline()
==false.public abstract List<LogRecord> getLogRecords() throws IOException, InterruptedException
IOException
InterruptedException
public abstract void doLaunchSlaveAgent(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
getChannel()
==null, attempts to relaunch the agent.IOException
javax.servlet.ServletException
@Deprecated public final void launch()
connect(boolean)
public final Future<?> connect(boolean forceReconnect)
doLaunchSlaveAgent(StaplerRequest, StaplerResponse)
but outside the context of serving a request.
If already connected or if this computer doesn't support proactive launching, no-op. This method may return immediately while the launch operation happens asynchronously.
forceReconnect
- If true and a connect activity is already in progress, it will be cancelled and
the new one will be started. If false, and a connect activity is already in progress, this method
will do nothing and just return the pending connection operation.Future
representing pending completion of the task. The 'completion' includes
both a successful completion and a non-successful completion (such distinction typically doesn't
make much sense because as soon as Computer
is connected it can be disconnected by some other threads.)disconnect()
protected abstract Future<?> _connect(boolean forceReconnect)
If already connected or if this computer doesn't support proactive launching, no-op. This method may return immediately while the launch operation happens asynchronously.
forceReconnect
- If true and a connect activity is already in progress, it will be cancelled and
the new one will be started. If false, and a connect activity is already in progress, this method
will do nothing and just return the pending connection operation.Future
representing pending completion of the task. The 'completion' includes
both a successful completion and a non-successful completion (such distinction typically doesn't
make much sense because as soon as Computer
is connected it can be disconnected by some other threads.)disconnect()
@Deprecated public void cliConnect(boolean force) throws ExecutionException, InterruptedException
ConnectNodeCommand
.force
- If true cancel any currently pending connect operation and retry from scratchExecutionException
InterruptedException
public final long getConnectTime()
public Future<?> disconnect(OfflineCause cause)
cause
- Object that identifies the reason the node was disconnected.Future
to track the asynchronous disconnect operation.connect(boolean)
@Deprecated public Future<?> disconnect()
disconnect(OfflineCause)
and specify the cause.disconnect(null)
@Deprecated public void cliDisconnect(String cause) throws ExecutionException, InterruptedException
DisconnectNodeCommand
.cause
- Record the note about why you are disconnecting this nodeExecutionException
InterruptedException
@Deprecated public void cliOffline(String cause) throws ExecutionException, InterruptedException
OfflineNodeCommand
.cause
- Record the note about why you are disconnecting this nodeExecutionException
InterruptedException
@Deprecated public void cliOnline() throws ExecutionException, InterruptedException
OnlineNodeCommand
.@Exported public int getNumExecutors()
@NonNull public String getName()
the name of the node
.@CheckForNull public abstract Boolean isUnix()
null
if the computer is disconnected and therefore we don't know whether it is Unix or not.@CheckForNull public Node getNode()
Node
that this computer represents.Computer
is not yet gone.@Exported public LoadStatistics getLoadStatistics()
public BuildTimelineWidget getTimeline()
@Exported public boolean isOffline()
public final boolean isOnline()
@Exported public boolean isManualLaunchAllowed()
true
if manual launching of the agent is allowed at this point in time.public abstract boolean isConnecting()
connect(boolean)
operation in progress?@Exported @Deprecated public boolean isJnlpAgent()
@Exported public boolean isLaunchSupported()
For example, inbound agents return false
from this, because the launch process
needs to be initiated from the agent side.
@Exported @Deprecated public boolean isTemporarilyOffline()
isOffline()
.
This method is marked as deprecated to warn people when they
accidentally call this method.
In contrast, isOffline()
represents the actual online/offline
state. For example, this method may return false while isOffline()
returns true if the agent failed to launch.
@Deprecated public void setTemporarilyOffline(boolean temporarilyOffline)
setTemporarilyOffline(boolean, OfflineCause)
public void setTemporarilyOffline(boolean temporarilyOffline, OfflineCause cause)
Channel
connection, but prevent builds from executing.cause
- If the first argument is true, specify the reason why the node is being put
offline.@Exported public String getIcon()
isOffline()
getIconClassName()
@Exported public String getIconClassName()
Icon.toNormalizedIconSizeClass(String)
The conversion of class tag to src tag is registered through IconSet.addIcon(Icon)
It is both the recommended and default implementation to serve different icons based on isOffline()
getIcon()
public String getIconAltText()
@Exported @NonNull public String getDisplayName()
getDisplayName
in interface ModelObject
public String getCaption()
public String getUrl()
public List<AbstractProject> getTiedJobs()
public RunList getBuilds()
protected void setNode(Node node)
protected void kill()
Jenkins.updateComputerList()
to notify Computer
that it will be discarded.
Note that at this point getNode()
returns null.
onRemoved()
protected void onRemoved()
Jenkins
when this computer is removed.
This happens when list of nodes are updated (for example by Jenkins.setNodes(List)
and
the computer becomes redundant. Such Computer
s get killed, then
after all its executors are finished, this method is called.
Note that at this point getNode()
returns null.
kill()
public int countIdle()
Executor
s that can start working immediately.public final int countBusy()
Executor
s that are doing some work right now.public final int countExecutors()
getNumExecutors()
if there
are busy tasks when the configured size is decreased. OneOffExecutors are
not included in this count.@Exported @StaplerDispatchable public List<Executor> getExecutors()
Executor
s.@Exported @StaplerDispatchable public List<OneOffExecutor> getOneOffExecutors()
OneOffExecutor
s.public List<Executor> getAllExecutors()
Executor
instances including OneOffExecutors.Executor
instances including OneOffExecutors.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<Computer.DisplayExecutor> getDisplayExecutors()
@Exported public final boolean isIdle()
public final boolean isPartiallyIdle()
public final long getIdleStartMilliseconds()
If this computer is already idle, the return value will point to the time in the past since when this computer has been idle.
If this computer is busy, the return value will point to the time in the future where this computer will be expected to become free.
public final long getDemandStartMilliseconds()
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @Exported @NonNull public String getDescription()
protected void removeExecutor(Executor e)
Executor
to kill excessive executors from this computer.protected boolean isAlive()
public void interrupt()
Executor
s.
Called from Jenkins.cleanUp()
.public String getSearchUrl()
SearchItem
SearchItem
.getSearchUrl
in interface SearchItem
public abstract RetentionStrategy getRetentionStrategy()
RetentionStrategy
associated with this computer.RetentionStrategy<? super T>
where
T=this.getClass()
.@Exported(inline=true) public Map<String,Object> getMonitorData()
public Map<Object,Object> getSystemProperties() throws IOException, InterruptedException
IOException
InterruptedException
@Deprecated public Map<String,String> getEnvVars() throws IOException, InterruptedException
getEnvironment()
instead.IOException
InterruptedException
public EnvVars getEnvironment() throws IOException, InterruptedException
IOException
InterruptedException
@NonNull public EnvVars buildEnvironment(@NonNull TaskListener listener) throws IOException, InterruptedException
IOException
InterruptedException
Launcher.ProcStarter.envs(Map)
public Map<String,String> getThreadDump() throws IOException, InterruptedException
IOException
InterruptedException
public RemotingDiagnostics.HeapDump getHeapDump() throws IOException
IOException
public String getHostName() throws IOException, InterruptedException
Since it's possible that the agent is not reachable from the master (it may be behind a firewall, connecting to master via inbound protocol), this method may return null. It's surprisingly tricky for a machine to know a name that other systems can get to, especially between things like DNS search suffix, the hosts file, and YP.
So the technique here is to compute possible interfaces and names on the agent, then try to ping them from the master, and pick the one that worked.
The computation may take some time, so it employs caching to make the successive lookups faster.
IOException
InterruptedException
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public void doRssAll(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public void doRssFailed(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public void doRssLatest(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
AbstractProject
is displayed since there isn't a proper API to gather
information about the node where the builds are executed for other sorts of projects such as PipelineIOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpResponse doToggleOffline(@QueryParameter String offlineMessage) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpResponse doChangeOfflineCause(@QueryParameter String offlineMessage) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public Api getApi()
public void doDumpExportTable(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, InterruptedException
IOException
javax.servlet.ServletException
InterruptedException
public void doScript(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doScriptText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void _doScript(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, String view) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
@POST public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException
IOException
javax.servlet.ServletException
Descriptor.FormException
@WebMethod(name="config.xml") public void doConfigDotXml(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
config.xml
submission, as well as serve it.IOException
javax.servlet.ServletException
public void updateByXml(InputStream source) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpResponse doDoDelete() throws IOException
IOException
public void waitUntilOnline() throws InterruptedException
InterruptedException
public void waitUntilOffline() throws InterruptedException
InterruptedException
public void doProgressiveLog(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
IOException
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Object getTarget()
getTarget
in interface org.kohsuke.stapler.StaplerProxy
@Nullable public static Computer currentComputer()
Computer
that the build is running.
This method only works when called during a build, such as by
Publisher
, BuildWrapper
, etc.Computer
associated with Executor.currentExecutor()
, or (consistently as of 1.591) null if not on an executor thread@OverrideMustInvoke public boolean isAcceptingTasks()
true
if the computer is accepting tasks. Needed to allow agents programmatic suspension of task
scheduling that does not overlap with being offline.true
if the computer is accepting tasksRetentionStrategy.isAcceptingTasks(Computer)
,
Node.isAcceptingTasks()
@CLIResolver public static Computer resolveForCLI(String name) throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineException
@Initializer public static void relocateOldLogs()
getLogFile()
Copyright © 2004–2022. All rights reserved.