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, MINIMUM
BY_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, wait
fixedVersionSelector, preferredVersionSelector, preferredVersionSelector, resolveVersionSelector
findByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByName
protected final SftpVersionSelector selector
public NamedVersionSelector(String name, SftpVersionSelector selector)
public int selectVersion(ClientSession session, boolean initial, int current, List<Integer> available)
selectVersion
in interface SftpVersionSelector
session
- 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 NamedResource
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.