Package io.jenkins.plugins.swarmcloud
Class SwarmAgent
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Node
hudson.model.Slave
hudson.slaves.AbstractCloudSlave
io.jenkins.plugins.swarmcloud.SwarmAgent
- All Implemented Interfaces:
ExtensionPoint,Describable<Node>,ModelObject,PersistenceRoot,ReconfigurableDescribable<Node>,Saveable,SearchableModelObject,SearchItem,AccessControlled,Serializable,OnMaster
Jenkins agent running on Docker Swarm.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classComputer implementation for Swarm agents.Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptorNested 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
ConstructorsConstructorDescriptionSwarmAgent(String name, SwarmAgentTemplate template, String cloudName, String serviceId) SwarmAgent(String name, SwarmAgentTemplate template, String cloudName, String serviceId, int idleMinutes) Constructor with custom idle timeout. -
Method Summary
Modifier and TypeMethodDescriptionprotected void_terminate(TaskListener listener) getCloud()Gets the cloud that provisioned this agent.longGets the template that was used to create this agent.protected ObjectCalled after deserialization to restore transient state.Methods inherited from class hudson.slaves.AbstractCloudSlave
terminateMethods inherited from class hudson.model.Slave
createLauncher, drainLabelsToTrim, equals, getClockDifferenceCallable, getComputer, getDescriptor, getLabelAtomSet, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRetentionStrategy, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, save, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toStringMethods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getConfigFile, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getRootDir, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, onLoad, reconfigure, reconfigure, toComputerMethods 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, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Constructor Details
-
SwarmAgent
@DataBoundConstructor public SwarmAgent(@NonNull String name, @NonNull SwarmAgentTemplate template, @NonNull String cloudName, @NonNull String serviceId) throws Descriptor.FormException, IOException - Throws:
Descriptor.FormExceptionIOException
-
SwarmAgent
public SwarmAgent(@NonNull String name, @NonNull SwarmAgentTemplate template, @NonNull String cloudName, @NonNull String serviceId, int idleMinutes) throws Descriptor.FormException, IOException Constructor with custom idle timeout. Connection timeout is taken from the template configuration.- Throws:
Descriptor.FormExceptionIOException
-
-
Method Details
-
readResolve
Called after deserialization to restore transient state. Jenkins requires this to properly initialize the agent after loading from disk.- Overrides:
readResolvein classSlave
-
getCloudName
-
getServiceId
-
getTemplateName
-
getCreatedTime
public long getCreatedTime() -
getCloud
Gets the cloud that provisioned this agent. -
getTemplate
Gets the template that was used to create this agent. -
createComputer
- Specified by:
createComputerin classAbstractCloudSlave
-
_terminate
- Specified by:
_terminatein classAbstractCloudSlave- Throws:
IOExceptionInterruptedException
-