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,Named,HasWidgets,IconSpec,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.TerminationRequestNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final hudson.remoting.LocalChannelDeprecated.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Future<?> _connect(boolean forceReconnect) Allows implementing-classes to provide an implementation for the connect method.voiddoConfigDotXml(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Acceptsconfig.xmlsubmission, as well as serve it.voiddoConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Accepts the update to the node configuration.org.kohsuke.stapler.HttpResponseReport an error.voiddoLaunchSlaveAgent(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) IfComputer.getChannel()==null, attempts to relaunch the agent.hudson.remoting.VirtualChannelGets 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().RetentionStrategyassociated with this computer.getUrl()booleanhasPermission(Permission permission) Convenient short-cut forgetACL().hasPermission(permission)protected booleanisAlive()Will always keep this guy alive so that it can function as a fallback to executeQueue.FlyweightTasks.booleanisUnix()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, getIconClassName, getIdleStartMilliseconds, getLoadStatistics, getLog, getLogDir, getLogFile, getLogText, getMonitorData, getMonitoringData, getNode, getNumExecutors, getOfflineCause, getOfflineCauseReason, getOneOffExecutors, getSearchGroup, getSearchUrl, getSystemProperties, getTarget, getTemporaryOfflineCauseReason, getTerminatedBy, getThreadDump, getTiedJobs, getTimeline, getWorkspaceList, hasOfflineCause, interrupt, isAcceptingTasks, isConnected, isIdle, isJnlpAgent, isLaunchSupported, isManualLaunchAllowed, isOffline, isOnline, isPartiallyIdle, isTemporarilyOffline, kill, launch, onRemoved, recordTermination, relocateOldLogs, removeExecutor, resolveForCLI, setNode, setOfflineCause, setTemporarilyOffline, setTemporarilyOffline, setTemporaryOfflineCause, updateByXml, waitUntilOffline, waitUntilOnlineMethods inherited from class hudson.model.Actionable
addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods 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.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface hudson.model.ExecutorListener
taskAccepted, taskCompleted, taskCompletedWithProblems, taskStartedMethods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgetsMethods inherited from interface jenkins.model.IComputer
getACL, getIconAltText, getTooltipMethods inherited from interface hudson.search.SearchItem
getSearchIcon
-
Field Details
-
localChannel
Deprecated.as of 1.558 UseFilePath.localChannelLocalChannelinstance 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:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classComputer
-
getCaption
- Overrides:
getCaptionin classComputer
-
getUrl
-
getRetentionStrategy
Description copied from class:ComputerRetentionStrategyassociated with this computer.- Specified by:
getRetentionStrategyin 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.FlyweightTasks. See JENKINS-7291. -
isUnix
Description copied from class:ComputerTrue if this computer is a Unix machine (as opposed to Windows machine). -
doDoDelete
Report an error.- Overrides:
doDoDeletein 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:ComputerAccepts the update to the node configuration.- Overrides:
doConfigSubmitin classComputer- Throws:
IOExceptionjakarta.servlet.ServletExceptionDescriptor.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:ComputerAcceptsconfig.xmlsubmission, as well as serve it.- Overrides:
doConfigDotXmlin classComputer- Throws:
IOExceptionjakarta.servlet.ServletException
-
hasPermission
Description copied from interface:AccessControlledConvenient short-cut forgetACL().hasPermission(permission) -
getChannel
public hudson.remoting.VirtualChannel getChannel()Description copied from class:ComputerGets the channel that can be used to run a program on this computer.- Specified by:
getChannelin classComputer- Returns:
- never null when
Computer.isOffline()==false.
-
getDefaultCharset
Description copied from class:ComputerGets the default charset of this computer.- Specified by:
getDefaultCharsetin classComputer- Returns:
- never null when
Computer.isOffline()==false.
-
getLogRecords
Description copied from class:ComputerGets the logs recorded by this agent.- Specified by:
getLogRecordsin classComputer- Throws:
IOExceptionInterruptedException
-
doLaunchSlaveAgent
public void doLaunchSlaveAgent(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Description copied from class:ComputerIfComputer.getChannel()==null, attempts to relaunch the agent.- Specified by:
doLaunchSlaveAgentin classComputer- Throws:
IOExceptionjakarta.servlet.ServletException
-
_connect
Description copied from class:ComputerAllows 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:
_connectin 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
Futurerepresenting 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 asComputeris connected it can be disconnected by some other threads.) - See Also:
-
FilePath.localChannel