Class TrileadSSHPublicKeyAuthenticator.Factory

java.lang.Object
com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticatorFactory
com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.Factory
All Implemented Interfaces:
ExtensionPoint, Serializable
Enclosing class:
TrileadSSHPublicKeyAuthenticator

@OptionalExtension(requirePlugins="trilead-api") public static class TrileadSSHPublicKeyAuthenticator.Factory extends SSHAuthenticatorFactory
Extension point to allow plugging in SSHAuthenticator implementations for the many SSH client libraries available.

This object can be shipped to remote to create an SSHAuthenticator on a remote node.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    ExtensionPoint.LegacyInstancesAreScopedToHudson
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <C, U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials>
    SSHAuthenticator<C,U>
    newInstance(C connection, U user)
    Returns an instance of SSHAuthenticator for the supplied connection and user, or null if 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 of SSHAuthenticator for the supplied connection and user, or null if the factory does not support the connection and user combination.
    protected <C, U extends com.cloudbees.plugins.credentials.common.StandardUsernameCredentials>
    boolean
    supports(Class<C> connectionClass, Class<U> userClass)
    Returns true if and only if the supplied connection class and user class are supported by this factory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 of SSHAuthenticator for the supplied connection and user, or null if the factory does not support the connection and user combination.
      Specified by:
      newInstance in class SSHAuthenticatorFactory
      Type Parameters:
      C - the type of connection.
      U - the type of user.
      Parameters:
      connection - the connection.
      user - the user.
      Returns:
      null if the connection or user is not supported by this factory, or a SSHAuthenticator instance 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 of SSHAuthenticator for the supplied connection and user, or null if the factory does not support the connection and user combination.
      Overrides:
      newInstance in class SSHAuthenticatorFactory
      Type Parameters:
      C - the type of connection.
      U - the type of user.
      Parameters:
      connection - the connection.
      user - the user.
      username - the username or null to fall back to the username in the user parameter.
      Returns:
      null if the connection or user is not supported by this factory, or a SSHAuthenticator instance 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)
      Returns true if and only if the supplied connection class and user class are supported by this factory.
      Specified by:
      supports in class SSHAuthenticatorFactory
      Type Parameters:
      C - the type of connection.
      U - the type of user.
      Parameters:
      connectionClass - the connection class.
      userClass - the user class.
      Returns:
      true if and only if the supplied connection class and user class are supported by this factory.