Package jenkins.model
Class Jenkins.MasterComputer
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.model.Computer
jenkins.model.Jenkins.MasterComputer
- All Implemented Interfaces:
ExtensionPoint
,DescriptorByNameOwner
,ExecutorListener
,ModelObject
,SearchableModelObject
,SearchItem
,AccessControlled
,IComputer
,ModelObjectWithContextMenu
,HasWidgets
,org.kohsuke.stapler.StaplerProxy
- Direct Known Subclasses:
Hudson.MasterComputer
- Enclosing class:
- Jenkins
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Computer
Computer.InternalComputerListener, Computer.TerminationRequest
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
Field Summary
Modifier and TypeFieldDescriptionstatic final hudson.remoting.LocalChannel
Deprecated.Fields inherited from class hudson.model.Computer
BUILD, CONFIGURE, CONNECT, CREATE, DELETE, DISCONNECT, EXTENDED_READ, EXTENDED_READ_AND_CONNECT, nodeName, offlineCause, PERMISSIONS, SKIP_PERMISSION_CHECK, statusChangeLock, threadPoolForRemoting, transientActions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Future<?>
_connect
(boolean forceReconnect) Allows implementing-classes to provide an implementation for the connect method.void
doConfigDotXml
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Acceptsconfig.xml
submission, as well as serve it.void
doConfigSubmit
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Accepts the update to the node configuration.org.kohsuke.stapler.HttpResponse
Report an error.void
doLaunchSlaveAgent
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) IfComputer.getChannel()
==null, attempts to relaunch the agent.hudson.remoting.VirtualChannel
Gets the channel that can be used to run a program on this computer.Gets the default charset of this computer.Gets the logs recorded by this agent.getName()
Returns "" to match withAbstractCIBase.getNodeName()
.RetentionStrategy
associated with this computer.getUrl()
boolean
hasPermission
(Permission permission) Convenient short-cut forgetACL().hasPermission(permission)
protected boolean
isAlive()
Will always keep this guy alive so that it can function as a fallback to executeQueue.FlyweightTask
s.boolean
isUnix()
True if this computer is a Unix machine (as opposed to Windows machine).Methods inherited from class hudson.model.Computer
_doScript, addAction, buildEnvironment, cliConnect, cliDisconnect, cliOffline, cliOnline, connect, countBusy, countExecutors, countIdle, currentComputer, disconnect, disconnect, doChangeOfflineCause, doDumpExportTable, doProgressiveLog, doRssAll, doRssFailed, doRssLatest, doScript, doScriptText, doToggleOffline, getActions, getAllExecutors, getApi, getAssignedLabels, getBuilds, getComputerPanelBoxs, getConnectTime, getDemandStartMilliseconds, getDescription, getDisplayExecutors, getEnvironment, getEnvVars, getExecutors, getHeapDump, getHostName, getIcon, getIconAltText, getIconClassName, getIdleStartMilliseconds, getLoadStatistics, getLog, getLogDir, getLogFile, getLogText, getMonitorData, getMonitoringData, getNode, getNumExecutors, getOfflineCause, getOfflineCauseReason, getOneOffExecutors, getSearchUrl, getSystemProperties, getTarget, getTerminatedBy, getThreadDump, getTiedJobs, getTimeline, getWorkspaceList, hasOfflineCause, interrupt, isAcceptingTasks, isIdle, isJnlpAgent, isLaunchSupported, isManualLaunchAllowed, isOffline, isOnline, isPartiallyIdle, isTemporarilyOffline, kill, launch, onRemoved, recordTermination, relocateOldLogs, removeExecutor, resolveForCLI, setNode, setTemporarilyOffline, setTemporarilyOffline, updateByXml, waitUntilOffline, waitUntilOnline
Methods inherited from class hudson.model.Actionable
addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, 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, toString, wait, wait, wait
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
Methods inherited from interface hudson.model.ExecutorListener
taskAccepted, taskCompleted, taskCompletedWithProblems, taskStarted
Methods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgets
-
Field Details
-
localChannel
Deprecated.as of 1.558 UseFilePath.localChannel
LocalChannel
instance that can be used to execute programs locally.
-
-
Constructor Details
-
MasterComputer
protected MasterComputer()
-
-
Method Details
-
getName
Returns "" to match withAbstractCIBase.getNodeName()
. -
isConnecting
public boolean isConnecting()- Returns:
- true if the node is currently connecting to the Jenkins controller.
-
getDisplayName
- Specified by:
getDisplayName
in interfaceIComputer
- Specified by:
getDisplayName
in interfaceModelObject
- Overrides:
getDisplayName
in classComputer
- Returns:
- the node name for UI purposes.
-
getCaption
- Overrides:
getCaption
in classComputer
-
getUrl
-
getRetentionStrategy
Description copied from class:Computer
RetentionStrategy
associated with this computer.- Specified by:
getRetentionStrategy
in classComputer
- Returns:
- never null. This method return
RetentionStrategy<? super T>
whereT=this.getClass()
.
-
isAlive
protected boolean isAlive()Will always keep this guy alive so that it can function as a fallback to executeQueue.FlyweightTask
s. See JENKINS-7291. -
isUnix
Description copied from class:Computer
True if this computer is a Unix machine (as opposed to Windows machine). -
doDoDelete
Report an error.- Overrides:
doDoDelete
in classComputer
- Throws:
IOException
-
doConfigSubmit
@POST public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException Description copied from class:Computer
Accepts the update to the node configuration.- Overrides:
doConfigSubmit
in classComputer
- Throws:
IOException
jakarta.servlet.ServletException
Descriptor.FormException
-
doConfigDotXml
@WebMethod(name="config.xml") public void doConfigDotXml(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Description copied from class:Computer
Acceptsconfig.xml
submission, as well as serve it.- Overrides:
doConfigDotXml
in classComputer
- Throws:
IOException
jakarta.servlet.ServletException
-
hasPermission
Description copied from interface:AccessControlled
Convenient short-cut forgetACL().hasPermission(permission)
-
getChannel
public hudson.remoting.VirtualChannel getChannel()Description copied from class:Computer
Gets the channel that can be used to run a program on this computer.- Specified by:
getChannel
in classComputer
- Returns:
- never null when
Computer.isOffline()
==false.
-
getDefaultCharset
Description copied from class:Computer
Gets the default charset of this computer.- Specified by:
getDefaultCharset
in classComputer
- Returns:
- never null when
Computer.isOffline()
==false.
-
getLogRecords
Description copied from class:Computer
Gets the logs recorded by this agent.- Specified by:
getLogRecords
in classComputer
- Throws:
IOException
InterruptedException
-
doLaunchSlaveAgent
public void doLaunchSlaveAgent(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Description copied from class:Computer
IfComputer.getChannel()
==null, attempts to relaunch the agent.- Specified by:
doLaunchSlaveAgent
in classComputer
- Throws:
IOException
jakarta.servlet.ServletException
-
_connect
Description copied from class:Computer
Allows implementing-classes to provide an implementation for the connect method.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.
- Specified by:
_connect
in classComputer
- Parameters:
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.- Returns:
- A
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 asComputer
is connected it can be disconnected by some other threads.) - See Also:
-
FilePath.localChannel