Class SftpVersionSelector.NamedVersionSelector

java.lang.Object
org.apache.sshd.sftp.client.SftpVersionSelector.NamedVersionSelector
All Implemented Interfaces:
NamedResource, SftpVersionSelector
Enclosing interface:
SftpVersionSelector

public static class SftpVersionSelector.NamedVersionSelector extends Object implements SftpVersionSelector, NamedResource
Wraps a SftpVersionSelector and assigns it a name. Note: SftpVersionSelector.NamedVersionSelector are considered equal if they are assigned the same name - case insensitive
  • Field Details

  • Constructor Details

  • Method Details

    • selectVersion

      public int selectVersion(ClientSession session, boolean initial, int current, List<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 String getName()
      Specified by:
      getName in interface NamedResource
      Returns:
      The resource name
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object