public static final class SftpVersionSelector.Utils extends Object
SftpVersionSelector
sModifier and Type | Method and Description |
---|---|
static SftpVersionSelector |
fixedVersionSelector(int version)
Creates a selector the always returns the requested (fixed version) regardless
of what the current or reported available versions are.
|
static SftpVersionSelector |
preferredVersionSelector(int... preferred)
Selects a version in order of preference - if none of the preferred
versions is listed as available then an exception is thrown when the
SftpVersionSelector.selectVersion(int, List) method is invoked |
static SftpVersionSelector |
preferredVersionSelector(Iterable<? extends Number> preferred)
Selects a version in order of preference - if none of the preferred
versions is listed as available then an exception is thrown when the
SftpVersionSelector.selectVersion(int, List) method is invoked |
public static SftpVersionSelector fixedVersionSelector(int version)
version
- The requested versionSftpVersionSelector
public static SftpVersionSelector preferredVersionSelector(int... preferred)
SftpVersionSelector.selectVersion(int, List)
method is invokedpreferred
- The preferred versions in decreasing order of
preference (i.e., most preferred is 1st) - may not be null
/emptySftpVersionSelector
that attempts to select
the most preferred version that is also listed as available.public static SftpVersionSelector preferredVersionSelector(Iterable<? extends Number> preferred)
SftpVersionSelector.selectVersion(int, List)
method is invokedpreferred
- The preferred versions in decreasing order of
preference (i.e., most preferred is 1st)SftpVersionSelector
that attempts to select
the most preferred version that is also listed as available.Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.