public static class SftpVersionSelector.NamedVersionSelector extends Object implements SftpVersionSelector, NamedResource
SftpVersionSelector and assigns it a name. Note: SftpVersionSelector.NamedVersionSelector are
considered equal if they are assigned the same name - case insensitiveSftpVersionSelector.NamedVersionSelector| Modifier and Type | Field and Description |
|---|---|
protected SftpVersionSelector |
selector |
CURRENT, MAXIMUM, MINIMUMBY_NAME_COMPARATOR, NAME_EXTRACTOR| Constructor and Description |
|---|
NamedVersionSelector(String name,
SftpVersionSelector selector) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getName() |
int |
hashCode() |
int |
selectVersion(ClientSession session,
boolean initial,
int current,
List<Integer> available) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitfixedVersionSelector, preferredVersionSelector, preferredVersionSelector, resolveVersionSelectorfindByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByNameprotected final SftpVersionSelector selector
public NamedVersionSelector(String name, SftpVersionSelector selector)
public int selectVersion(ClientSession session, boolean initial, int current, List<Integer> available)
selectVersion in interface SftpVersionSelectorsession - The ClientSession through which the SFTP connection is madeinitial - 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 serveravailable - Extra versions available - may be empty and/or contain only the current onepublic String getName()
getName in interface NamedResourceCopyright © 2018–2021 The Apache Software Foundation. All rights reserved.