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,ModelObjectWithContextMenu,HasWidgets,org.kohsuke.stapler.StaplerProxy
- Direct Known Subclasses:
Hudson.MasterComputer
- Enclosing class:
- Jenkins
public static class Jenkins.MasterComputer extends Computer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Computer
Computer.DisplayExecutor, 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
Fields Modifier and Type Field Description static hudson.remoting.LocalChannellocalChannelDeprecated.as of 1.558 UseFilePath.localChannel-
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 Modifier Constructor Description protectedMasterComputer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Future<?>_connect(boolean forceReconnect)Allows implementing-classes to provide an implementation for the connect method.voiddoConfigDotXml(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Acceptsconfig.xmlsubmission, as well as serve it.voiddoConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Accepts the update to the node configuration.org.kohsuke.stapler.HttpResponsedoDoDelete()Report an error.voiddoLaunchSlaveAgent(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)IfComputer.getChannel()==null, attempts to relaunch the agent.StringgetCaption()hudson.remoting.VirtualChannelgetChannel()Gets the channel that can be used to run a program on this computer.CharsetgetDefaultCharset()Gets the default charset of this computer.StringgetDisplayName()List<LogRecord>getLogRecords()Gets the logs recorded by this agent.StringgetName()Returns "" to match withAbstractCIBase.getNodeName().RetentionStrategygetRetentionStrategy()RetentionStrategyassociated with this computer.StringgetUrl()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.booleanisConnecting()Is aComputer.connect(boolean)operation in progress?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, getACL, 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, 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, getAction, getAction, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, 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 Detail
-
localChannel
@Deprecated public static final hudson.remoting.LocalChannel localChannel
Deprecated.as of 1.558 UseFilePath.localChannelLocalChannelinstance that can be used to execute programs locally.
-
-
Method Detail
-
getName
public String getName()
Returns "" to match withAbstractCIBase.getNodeName().
-
isConnecting
public boolean isConnecting()
Description copied from class:ComputerIs aComputer.connect(boolean)operation in progress?- Specified by:
isConnectingin classComputer
-
getDisplayName
@NonNull public String getDisplayName()
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classComputer
-
getCaption
public String getCaption()
- Overrides:
getCaptionin classComputer
-
getRetentionStrategy
public RetentionStrategy 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
public Boolean isUnix()
Description copied from class:ComputerTrue if this computer is a Unix machine (as opposed to Windows machine).
-
doDoDelete
public org.kohsuke.stapler.HttpResponse doDoDelete() throws IOExceptionReport an error.- Overrides:
doDoDeletein classComputer- Throws:
IOException
-
doConfigSubmit
@POST public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormExceptionDescription copied from class:ComputerAccepts the update to the node configuration.- Overrides:
doConfigSubmitin classComputer- Throws:
IOExceptionjavax.servlet.ServletExceptionDescriptor.FormException
-
doConfigDotXml
@WebMethod(name="config.xml") public void doConfigDotXml(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionDescription copied from class:ComputerAcceptsconfig.xmlsubmission, as well as serve it.- Overrides:
doConfigDotXmlin classComputer- Throws:
IOExceptionjavax.servlet.ServletException
-
hasPermission
public boolean hasPermission(Permission permission)
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
public Charset getDefaultCharset()
Description copied from class:ComputerGets the default charset of this computer.- Specified by:
getDefaultCharsetin classComputer- Returns:
- never null when
Computer.isOffline()==false.
-
getLogRecords
public List<LogRecord> getLogRecords() throws IOException, InterruptedException
Description copied from class:ComputerGets the logs recorded by this agent.- Specified by:
getLogRecordsin classComputer- Throws:
IOExceptionInterruptedException
-
doLaunchSlaveAgent
public void doLaunchSlaveAgent(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionDescription copied from class:ComputerIfComputer.getChannel()==null, attempts to relaunch the agent.- Specified by:
doLaunchSlaveAgentin classComputer- Throws:
IOExceptionjavax.servlet.ServletException
-
_connect
protected Future<?> _connect(boolean forceReconnect)
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:
Computer.disconnect()
-
-