Package hudson.slaves
Class ComputerConnector
- All Implemented Interfaces:
ExtensionPoint
,Describable<ComputerConnector>
public abstract class ComputerConnector
extends AbstractDescribableImpl<ComputerConnector>
implements 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
-
Method Summary
Modifier and TypeMethodDescriptionBy default looks for a nested class (conventionally namedDescriptorImpl
) implementingDescriptor
and marked withExtension
.abstract ComputerLauncher
launch
(String host, TaskListener listener) Creates aComputerLauncher
for 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 aComputerLauncher
for connecting to the given host.- Parameters:
host
- The host name / IP address of the machine to connect to.listener
- If- Throws:
IOException
InterruptedException
-
getDescriptor
Description copied from class:AbstractDescribableImpl
By default looks for a nested class (conventionally namedDescriptorImpl
) implementingDescriptor
and marked withExtension
.Gets the descriptor for this instance.
Descriptor
is a singleton for every concreteDescribable
implementation, 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:
getDescriptor
in interfaceDescribable<ComputerConnector>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<ComputerConnector>
-