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 aSftpVersionSelectorand assigns it a name. Note:SftpVersionSelector.NamedVersionSelectorare considered equal if they are assigned the same name - case insensitive- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sshd.sftp.client.SftpVersionSelector
SftpVersionSelector.NamedVersionSelector
-
-
Field Summary
Fields Modifier and Type Field Description protected SftpVersionSelectorselector-
Fields 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 Constructor Description NamedVersionSelector(String name, SftpVersionSelector selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetName()inthashCode()intselectVersion(ClientSession session, boolean initial, int current, List<Integer> available)StringtoString()
-
-
-
Field Detail
-
selector
protected final SftpVersionSelector selector
-
-
Constructor Detail
-
NamedVersionSelector
public NamedVersionSelector(String name, SftpVersionSelector selector)
-
-
Method Detail
-
selectVersion
public int selectVersion(ClientSession session, boolean initial, int current, List<Integer> available)
- Specified by:
selectVersionin interfaceSftpVersionSelector- Parameters:
session- TheClientSessionthrough which the SFTP connection is madeinitial- Iftruethen this is the initial version sent viaSSH_FXP_INITotherwise 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
public String getName()
- Specified by:
getNamein interfaceNamedResource
-
-