Package org.apache.sshd.sftp.client
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-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.sftp.client.SftpVersionSelector
SftpVersionSelector.NamedVersionSelector
-
Field Summary
FieldsFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Fields inherited from interface org.apache.sshd.sftp.client.SftpVersionSelector
CURRENT, MAXIMUM, MINIMUM
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
selector
-
name
-
-
Constructor Details
-
NamedVersionSelector
-
-
Method Details
-
selectVersion
public int selectVersion(ClientSession session, boolean initial, int current, List<Integer> available) - Specified by:
selectVersion
in interfaceSftpVersionSelector
- Parameters:
session
- TheClientSession
through which the SFTP connection is madeinitial
- Iftrue
then this is the initial version sent viaSSH_FXP_INIT
otherwise it is a re-negotiation.current
- The current version negotiated with the serveravailable
- 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
- Specified by:
getName
in interfaceNamedResource
- Returns:
- The resource name
-
hashCode
public int hashCode() -
equals
-
toString
-