Class SftpVersionSelector.NamedVersionSelector

    • Field Detail

      • name

        private final java.lang.String name
    • Constructor Detail

      • NamedVersionSelector

        public NamedVersionSelector​(java.lang.String name,
                                    SftpVersionSelector selector)
    • Method Detail

      • selectVersion

        public int selectVersion​(ClientSession session,
                                 boolean initial,
                                 int current,
                                 java.util.List<java.lang.Integer> available)
        Specified by:
        selectVersion in interface SftpVersionSelector
        Parameters:
        session - The ClientSession through which the SFTP connection is made
        initial - If true then this is the initial version sent via SSH_FXP_INIT otherwise it is a re-negotiation.
        current - The current version negotiated with the server
        available - Extra versions available - may be empty and/or contain only the current one
        Returns:
        The new requested version - if same as current, then nothing is done
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface NamedResource
        Returns:
        The resource name
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object