Class SSHAuthenticatorFactory

    • Constructor Detail

      • SSHAuthenticatorFactory

        public SSHAuthenticatorFactory()
    • Method Detail

      • newInstance

        @Nullable
        protected abstract <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.
        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.
        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.
        Since:
        1.4
      • supports

        protected abstract <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.
        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.