Package hudson.slaves
Class ComputerConnector
java.lang.Object
hudson.slaves.ComputerConnector
- All Implemented Interfaces:
ExtensionPoint,Describable<ComputerConnector>
public abstract class ComputerConnector
extends Object
implements Describable<ComputerConnector>, ExtensionPoint
Factory of
ComputerLauncher.
When writing a Cloud implementation, one needs to dynamically create ComputerLauncher
by supplying a host name. This is the abstraction for that.- Since:
- 1.383
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the descriptor for this instance.abstract ComputerLauncherlaunch(String host, TaskListener listener) Creates aComputerLauncherfor connecting to the given host.
-
Constructor Details
-
ComputerConnector
public ComputerConnector()
-
-
Method Details
-
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
Description copied from interface:DescribableGets 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.)By default looks for a nested class (conventionally named
DescriptorImpl) implementingDescriptorand marked withExtension.- Specified by:
getDescriptorin interfaceDescribable<ComputerConnector>
-