Enum BuiltinCompressions
- All Implemented Interfaces:
Serializable, Comparable<BuiltinCompressions>, Supplier<Compression>, BuiltinFactory<Compression>, CompressionFactory, CompressionInformation, Factory<Compression>, NamedFactory<Compression>, NamedResource, OptionalFeature
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classHolds the result ofparseCompressionsList(String) -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<String, CompressionFactory> private final Stringstatic final Set<BuiltinCompressions> Fields inherited from interface NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTORFields inherited from interface OptionalFeature
FALSE, TRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BuiltinCompressionsfromFactoryName(String name) final StringgetName()static NavigableSet<CompressionFactory> booleanbooleanDelayed compression is an Open-SSH specific feature which informs both the client and server to not compress data before the session has been authenticated.final booleanparseCompressionsList(String compressions) parseCompressionsList(String... compressions) parseCompressionsList(Collection<String> compressions) static voidregisterExtension(CompressionFactory extension) Registered aNamedFactoryto be available besides the built-in ones when parsing configurationstatic CompressionFactoryresolveFactory(String name) final StringtoString()static CompressionFactoryunregisterExtension(String name) Unregisters specified extensionstatic BuiltinCompressionsReturns the enum constant of this type with the specified name.static BuiltinCompressions[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
none
-
zlib
-
delayedZlib
-
-
Field Details
-
VALUES
-
EXTENSIONS
-
name
-
-
Constructor Details
-
BuiltinCompressions
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getName
- Specified by:
getNamein interfaceNamedResource- Returns:
- The resource name
-
isDelayed
public boolean isDelayed()Description copied from interface:CompressionInformationDelayed compression is an Open-SSH specific feature which informs both the client and server to not compress data before the session has been authenticated.- Specified by:
isDelayedin interfaceCompressionInformation- Returns:
- if the compression is delayed after authentication or not
-
isCompressionExecuted
public boolean isCompressionExecuted()- Specified by:
isCompressionExecutedin interfaceCompressionInformation- Returns:
trueif there is any compression executed by this "compressor" - special case for 'none'
-
toString
- Overrides:
toStringin classEnum<BuiltinCompressions>
-
isSupported
public final boolean isSupported()- Specified by:
isSupportedin interfaceOptionalFeature
-
registerExtension
Registered aNamedFactoryto be available besides the built-in ones when parsing configuration- Parameters:
extension- The factory to register- Throws:
IllegalArgumentException- if factory instance isnull, or overrides a built-in one or overrides another registered factory with the same name (case insensitive).
-
getRegisteredExtensions
- Returns:
- A
SortedSetof the currently registered extensions, sorted according to the factory name (case insensitive)
-
unregisterExtension
Unregisters specified extension- Parameters:
name- The factory name - ignored ifnull/empty- Returns:
- The registered extension -
nullif not found
-
fromFactoryName
-
parseCompressionsList
- Parameters:
compressions- A comma-separated list of Compressions' names - ignored ifnull/empty- Returns:
- A
BuiltinCompressions.ParseResultcontaining the successfully parsed factories and the unknown ones. Note: it is up to caller to ensure that the lists do not contain duplicates
-
parseCompressionsList
-
parseCompressionsList
public static BuiltinCompressions.ParseResult parseCompressionsList(Collection<String> compressions) -
resolveFactory
- Parameters:
name- The factory name- Returns:
- The factory or
nullif it is neither a built-in one or a registered extension
-