Package hudson.slaves
Class AbstractCloudSlave
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Node
-
- hudson.model.Slave
-
- hudson.slaves.AbstractCloudSlave
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Node>
,ModelObject
,ReconfigurableDescribable<Node>
,Saveable
,SearchableModelObject
,SearchItem
,AccessControlled
,Serializable
,OnMaster
public abstract class AbstractCloudSlave extends Slave
Partial implementation ofSlave
to be used byAbstractCloudImpl
. You may want to implementEphemeralNode
too.- Since:
- 1.382
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptor
-
Nested classes/interfaces inherited from class hudson.model.Node
Node.InternalComputerListener, Node.Mode
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCloudSlave(String name, String remoteFS, ComputerLauncher launcher)
protected
AbstractCloudSlave(String name, String nodeDescription, String remoteFS, int numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties)
Deprecated.since 2.184protected
AbstractCloudSlave(String name, String nodeDescription, String remoteFS, String numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties)
Deprecated.since 2.184
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
_terminate(TaskListener listener)
Performs the removal of the underlying resource from the cloud.abstract AbstractCloudComputer
createComputer()
void
terminate()
Releases and removes this agent.-
Methods inherited from class hudson.model.Slave
createLauncher, equals, getClockDifferenceCallable, getComputer, getDescriptor, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRetentionStrategy, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, readResolve, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toString
-
Methods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, reconfigure, save, toComputer
-
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, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
-
-
-
Constructor Detail
-
AbstractCloudSlave
protected AbstractCloudSlave(@NonNull String name, String remoteFS, ComputerLauncher launcher) throws Descriptor.FormException, IOException
- Throws:
Descriptor.FormException
IOException
-
AbstractCloudSlave
@Deprecated protected AbstractCloudSlave(String name, String nodeDescription, String remoteFS, String numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties) throws Descriptor.FormException, IOException
Deprecated.since 2.184- Throws:
Descriptor.FormException
IOException
-
AbstractCloudSlave
@Deprecated protected AbstractCloudSlave(String name, String nodeDescription, String remoteFS, int numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties) throws Descriptor.FormException, IOException
Deprecated.since 2.184- Throws:
Descriptor.FormException
IOException
-
-
Method Detail
-
createComputer
public abstract AbstractCloudComputer createComputer()
Description copied from class:Node
Creates a newComputer
object that acts as the UI peer of thisNode
. Nobody butJenkins.updateComputerList()
should call this method.- Overrides:
createComputer
in classSlave
- Returns:
- Created instance of the computer.
Can be
null
if theNode
implementation does not support it (e.g.Cloud
agent).
-
terminate
public void terminate() throws InterruptedException, IOException
Releases and removes this agent.- Throws:
InterruptedException
IOException
-
_terminate
protected abstract void _terminate(TaskListener listener) throws IOException, InterruptedException
Performs the removal of the underlying resource from the cloud.- Throws:
IOException
InterruptedException
-
-