Package io.netty.handler.ssl
Enum SslHandler.SslEngineType
- All Implemented Interfaces:
Serializable
,Comparable<SslHandler.SslEngineType>
,java.lang.constant.Constable
- Enclosing class:
SslHandler
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ByteToMessageDecoder.Cumulator
When using JDKSSLEngine
, we useByteToMessageDecoder.MERGE_CUMULATOR
because it works only with oneByteBuffer
.(package private) final boolean
true
if and only ifSSLEngine
expects a direct buffer and so if a heap buffer is given will make an extra memory copy. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SslEngineType
(boolean wantsDirectBuffer, ByteToMessageDecoder.Cumulator cumulator) -
Method Summary
Modifier and TypeMethodDescription(package private) abstract ByteBuf
allocateWrapBuffer
(SslHandler handler, ByteBufAllocator allocator, int pendingBytes, int numComponents) (package private) abstract int
calculatePendingData
(SslHandler handler, int guess) (package private) abstract int
calculateRequiredOutBufSpace
(SslHandler handler, int pendingBytes, int numComponents) (package private) static SslHandler.SslEngineType
(package private) abstract boolean
jdkCompatibilityMode
(SSLEngine engine) (package private) abstract SSLEngineResult
unwrap
(SslHandler handler, ByteBuf in, int len, ByteBuf out) static SslHandler.SslEngineType
Returns the enum constant of this type with the specified name.static SslHandler.SslEngineType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TCNATIVE
-
JDK
-
-
Field Details
-
wantsDirectBuffer
final boolean wantsDirectBuffertrue
if and only ifSSLEngine
expects a direct buffer and so if a heap buffer is given will make an extra memory copy. -
cumulator
When using JDKSSLEngine
, we useByteToMessageDecoder.MERGE_CUMULATOR
because it works only with oneByteBuffer
. When usingOpenSslEngine
, we can useByteToMessageDecoder.COMPOSITE_CUMULATOR
because it hasReferenceCountedOpenSslEngine.unwrap(ByteBuffer[], ByteBuffer[])
which works with multipleByteBuffer
s and which does not need to do extra memory copies.
-
-
Constructor Details
-
SslEngineType
-
-
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
-
forEngine
-
unwrap
abstract SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) throws SSLException - Throws:
SSLException
-
calculatePendingData
-
jdkCompatibilityMode
-
allocateWrapBuffer
abstract ByteBuf allocateWrapBuffer(SslHandler handler, ByteBufAllocator allocator, int pendingBytes, int numComponents) -
calculateRequiredOutBufSpace
-