Class RemoteAgentFactory
- java.lang.Object
-
- com.cloudbees.jenkins.plugins.sshagent.RemoteAgentFactory
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
ExecRemoteAgentFactory
public abstract class RemoteAgentFactory extends Object implements ExtensionPoint
Extension point for ssh-agent providers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description RemoteAgentFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract String
getDisplayName()
The display name of the factory.abstract boolean
isSupported(Launcher launcher, TaskListener listener)
Checks if the supplied launcher is supported by this factory.abstract RemoteAgent
start(LauncherProvider launcherProvider, TaskListener listener, FilePath temp)
Start a ssh-agent on the specified launcher.
-
-
-
Method Detail
-
getDisplayName
public abstract String getDisplayName()
The display name of the factory.- Returns:
- The display name of the factory.
-
isSupported
public abstract boolean isSupported(Launcher launcher, TaskListener listener)
Checks if the supplied launcher is supported by this factory.- Parameters:
launcher
- the launcher on which the factory would be asked to start a ssh-agent.listener
- a listener in case any user diagnostics are to be printed.- Returns:
false
if the factory does not want to try and start an ssh-agent on the launcher.
-
start
public abstract RemoteAgent start(LauncherProvider launcherProvider, TaskListener listener, @CheckForNull FilePath temp) throws Throwable
Start a ssh-agent on the specified launcher.- Parameters:
launcherProvider
- provides launchers on which to start a ssh-agent.listener
- a listener for any diagnostics.temp
- a temporary directory to use; null if unspecified- Returns:
- the agent.
- Throws:
Throwable
- if the agent cannot be started.
-
-