Package org.apache.sshd.common.config
Enum CompressionConfigValue
- java.lang.Object
-
- java.lang.Enum<CompressionConfigValue>
-
- org.apache.sshd.common.config.CompressionConfigValue
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CompressionConfigValue>
,java.util.function.Supplier<Compression>
,BuiltinFactory<Compression>
,CompressionFactory
,CompressionInformation
,Factory<Compression>
,NamedFactory<Compression>
,NamedResource
,OptionalFeature
public enum CompressionConfigValue extends java.lang.Enum<CompressionConfigValue> implements CompressionFactory
Provides a "bridge" between the configuration values and the actualNamedFactory
for theCompression
.
-
-
Field Summary
Fields Modifier and Type Field Description private CompressionFactory
factory
static java.util.Set<CompressionConfigValue>
VALUES
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Fields inherited from interface org.apache.sshd.common.OptionalFeature
FALSE, TRUE
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CompressionConfigValue(CompressionFactory delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Compression
create()
static CompressionConfigValue
fromName(java.lang.String n)
java.lang.String
getName()
boolean
isCompressionExecuted()
boolean
isDelayed()
Delayed compression is an Open-SSH specific feature which informs both the client and server to not compress data before the session has been authenticated.boolean
isSupported()
java.lang.String
toString()
static CompressionConfigValue
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CompressionConfigValue[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
YES
public static final CompressionConfigValue YES
-
NO
public static final CompressionConfigValue NO
-
DELAYED
public static final CompressionConfigValue DELAYED
-
-
Field Detail
-
VALUES
public static final java.util.Set<CompressionConfigValue> VALUES
-
factory
private final CompressionFactory factory
-
-
Constructor Detail
-
CompressionConfigValue
private CompressionConfigValue(CompressionFactory delegate)
-
-
Method Detail
-
values
public static CompressionConfigValue[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompressionConfigValue c : CompressionConfigValue.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressionConfigValue valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
public final java.lang.String getName()
- Specified by:
getName
in interfaceNamedResource
- Returns:
- The resource name
-
create
public final Compression create()
- Specified by:
create
in interfaceFactory<Compression>
- Returns:
- A new instance
-
isSupported
public boolean isSupported()
- Specified by:
isSupported
in interfaceOptionalFeature
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<CompressionConfigValue>
-
isDelayed
public boolean isDelayed()
Description copied from interface:CompressionInformation
Delayed 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:
isDelayed
in interfaceCompressionInformation
- Returns:
- if the compression is delayed after authentication or not
-
isCompressionExecuted
public boolean isCompressionExecuted()
- Specified by:
isCompressionExecuted
in interfaceCompressionInformation
- Returns:
true
if there is any compression executed by this "compressor" - special case for 'none'
-
fromName
public static CompressionConfigValue fromName(java.lang.String n)
-
-