Enum SslHandler.SslEngineType
java.lang.Object
java.lang.Enum<SslHandler.SslEngineType>
io.netty.handler.ssl.SslHandler.SslEngineType
- All Implemented Interfaces:
java.io.Serializable, java.lang.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 intcalculateInitialUnwrapBufSize(SslHandler handler, int length) (package private) abstract intcalculatePendingData(SslHandler handler, int guess) (package private) abstract intcalculateRequiredOutBufSpace(SslHandler handler, int pendingBytes, int numComponents) (package private) static SslHandler.SslEngineTypeforEngine(javax.net.ssl.SSLEngine engine) (package private) abstract booleanjdkCompatibilityMode(javax.net.ssl.SSLEngine engine) (package private) abstract javax.net.ssl.SSLEngineResultunwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) static SslHandler.SslEngineTypevalueOf(java.lang.String name) 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.Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
forEngine
-
unwrap
abstract javax.net.ssl.SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) throws javax.net.ssl.SSLException - Throws:
javax.net.ssl.SSLException
-
calculatePendingData
-
calculateInitialUnwrapBufSize
-
jdkCompatibilityMode
abstract boolean jdkCompatibilityMode(javax.net.ssl.SSLEngine engine) -
allocateWrapBuffer
abstract ByteBuf allocateWrapBuffer(SslHandler handler, ByteBufAllocator allocator, int pendingBytes, int numComponents) -
calculateRequiredOutBufSpace
-