Class SftpVersionSelector.NamedVersionSelector
- java.lang.Object
-
- org.apache.sshd.client.subsystem.sftp.SftpVersionSelector.NamedVersionSelector
-
- All Implemented Interfaces:
SftpVersionSelector
- Enclosing interface:
- SftpVersionSelector
public static class SftpVersionSelector.NamedVersionSelector extends java.lang.Object implements SftpVersionSelector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sshd.client.subsystem.sftp.SftpVersionSelector
SftpVersionSelector.NamedVersionSelector
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
private SftpVersionSelector
selector
-
Fields inherited from interface org.apache.sshd.client.subsystem.sftp.SftpVersionSelector
CURRENT, MAXIMUM, MINIMUM
-
-
Constructor Summary
Constructors Constructor Description NamedVersionSelector(java.lang.String name, SftpVersionSelector selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
selectVersion(ClientSession session, int current, java.util.List<java.lang.Integer> available)
java.lang.String
toString()
-
-
-
Field Detail
-
name
private final java.lang.String name
-
selector
private final SftpVersionSelector selector
-
-
Constructor Detail
-
NamedVersionSelector
public NamedVersionSelector(java.lang.String name, SftpVersionSelector selector)
-
-
Method Detail
-
selectVersion
public int selectVersion(ClientSession session, int current, java.util.List<java.lang.Integer> available)
- Specified by:
selectVersion
in interfaceSftpVersionSelector
- Parameters:
session
- TheClientSession
through which the SFTP connection is madecurrent
- 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-