Enum SslHandler.SslEngineType
- All Implemented Interfaces:
Serializable, Comparable<SslHandler.SslEngineType>
- Enclosing class:
SslHandler
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ByteToMessageDecoder.CumulatorWhen using JDKSSLEngine, we useByteToMessageDecoder.MERGE_CUMULATORbecause it works only with oneByteBuffer.(package private) final booleantrueif and only ifSSLEngineexpects a direct buffer and so if a heap buffer is given will make an extra memory copy. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSslEngineType(boolean wantsDirectBuffer, ByteToMessageDecoder.Cumulator cumulator) -
Method Summary
Modifier and TypeMethodDescription(package private) abstract ByteBufallocateWrapBuffer(SslHandler handler, ByteBufAllocator allocator, int pendingBytes, int numComponents) (package private) abstract intcalculatePendingData(SslHandler handler, int guess) (package private) abstract intcalculateRequiredOutBufSpace(SslHandler handler, int pendingBytes, int numComponents) (package private) static SslHandler.SslEngineType(package private) abstract booleanjdkCompatibilityMode(SSLEngine engine) (package private) abstract SSLEngineResultunwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) static SslHandler.SslEngineTypeReturns 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 wantsDirectBuffertrueif and only ifSSLEngineexpects a direct buffer and so if a heap buffer is given will make an extra memory copy. -
cumulator
When using JDKSSLEngine, we useByteToMessageDecoder.MERGE_CUMULATORbecause it works only with oneByteBuffer. When usingOpenSslEngine, we can useByteToMessageDecoder.COMPOSITE_CUMULATORbecause it hasReferenceCountedOpenSslEngine.unwrap(ByteBuffer[], ByteBuffer[])which works with multipleByteBuffers 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
-