Class TrileadSSHPasswordAuthenticator.Factory
java.lang.Object
com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticatorFactory
com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator.Factory
- All Implemented Interfaces:
ExtensionPoint,Serializable
- Enclosing class:
TrileadSSHPasswordAuthenticator
@OptionalExtension(requirePlugins="trilead-api")
public static class TrileadSSHPasswordAuthenticator.Factory
extends SSHAuthenticatorFactory
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <C,U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials>
SSHAuthenticator<C, U> newInstance(C connection, U user) Returns an instance ofSSHAuthenticatorfor the supplied connection and user, ornullif the factory does not support the connection and user combination.protected <C,U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials>
SSHAuthenticator<C, U> newInstance(C connection, U user, String username) Returns an instance ofSSHAuthenticatorfor the supplied connection and user, ornullif the factory does not support the connection and user combination.protected <C,U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials>
booleanReturnstrueif and only if the supplied connection class and user class are supported by this factory.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
newInstance
protected <C,U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials> SSHAuthenticator<C,U> newInstance(@NonNull C connection, @NonNull U user) Returns an instance ofSSHAuthenticatorfor the supplied connection and user, ornullif the factory does not support the connection and user combination.- Specified by:
newInstancein classSSHAuthenticatorFactory- Type Parameters:
C- the type of connection.U- the type of user.- Parameters:
connection- the connection.user- the user.- Returns:
nullif the connection or user is not supported by this factory, or aSSHAuthenticatorinstance bound to the supplied connection and user.
-
newInstance
@Nullable protected <C,U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials> SSHAuthenticator<C,U> newInstance(@NonNull C connection, @NonNull U user, @CheckForNull String username) Returns an instance ofSSHAuthenticatorfor the supplied connection and user, ornullif the factory does not support the connection and user combination.- Overrides:
newInstancein classSSHAuthenticatorFactory- Type Parameters:
C- the type of connection.U- the type of user.- Parameters:
connection- the connection.user- the user.username- the username ornullto fall back to the username in the user parameter.- Returns:
nullif the connection or user is not supported by this factory, or aSSHAuthenticatorinstance bound to the supplied connection and user.
-
supports
protected <C,U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials> boolean supports(@NonNull Class<C> connectionClass, @NonNull Class<U> userClass) Returnstrueif and only if the supplied connection class and user class are supported by this factory.- Specified by:
supportsin classSSHAuthenticatorFactory- Type Parameters:
C- the type of connection.U- the type of user.- Parameters:
connectionClass- the connection class.userClass- the user class.- Returns:
trueif and only if the supplied connection class and user class are supported by this factory.
-