Package hudson.slaves
Class ComputerConnector
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ComputerConnector>
-
- hudson.slaves.ComputerConnector
-
- All Implemented Interfaces:
ExtensionPoint,Describable<ComputerConnector>
public abstract class ComputerConnector extends AbstractDescribableImpl<ComputerConnector> implements ExtensionPoint
Factory ofComputerLauncher. When writing aCloudimplementation, one needs to dynamically createComputerLauncherby supplying a host name. This is the abstraction for that.- Since:
- 1.383
- Author:
- Kohsuke Kawaguchi
- See Also:
ComputerLauncher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ComputerConnector()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ComputerConnectorDescriptorgetDescriptor()By default looks for a nested class (conventionally namedDescriptorImpl) implementingDescriptorand marked withExtension.abstract ComputerLauncherlaunch(String host, TaskListener listener)Creates aComputerLauncherfor connecting to the given host.
-
-
-
Method Detail
-
launch
public abstract ComputerLauncher launch(@NonNull String host, TaskListener listener) throws IOException, InterruptedException
Creates aComputerLauncherfor connecting to the given host.- Parameters:
host- The host name / IP address of the machine to connect to.listener- If- Throws:
IOExceptionInterruptedException
-
getDescriptor
public ComputerConnectorDescriptor getDescriptor()
Description copied from class:AbstractDescribableImplBy default looks for a nested class (conventionally namedDescriptorImpl) implementingDescriptorand marked withExtension.Gets the descriptor for this instance.
Descriptoris a singleton for every concreteDescribableimplementation, so ifa.getClass() == b.getClass()then by defaulta.getDescriptor() == b.getDescriptor()as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
getDescriptorin interfaceDescribable<ComputerConnector>- Overrides:
getDescriptorin classAbstractDescribableImpl<ComputerConnector>
-
-