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 aCloud
implementation, one needs to dynamically createComputerLauncher
by 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 ComputerConnectorDescriptor
getDescriptor()
By 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.
-
-
-
Method Detail
-
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
public ComputerConnectorDescriptor 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>
-
-