private static enum SslHandler.SslEngineType extends java.lang.Enum<SslHandler.SslEngineType>
Enum Constant and Description |
---|
JDK |
Modifier and Type | Field and Description |
---|---|
(package private) ByteToMessageDecoder.Cumulator |
cumulator
When using JDK
SSLEngine , we use ByteToMessageDecoder.MERGE_CUMULATOR because it works only with
one ByteBuffer . |
(package private) boolean |
wantsDirectBuffer
true if and only if SSLEngine expects a direct buffer. |
Modifier and Type | Method and Description |
---|---|
(package private) abstract int |
calculateWrapBufferCapacity(SslHandler handler,
int pendingBytes,
int numComponents) |
(package private) static SslHandler.SslEngineType |
forEngine(javax.net.ssl.SSLEngine engine) |
(package private) abstract javax.net.ssl.SSLEngineResult |
unwrap(SslHandler handler,
ByteBuf in,
int readerIndex,
int len,
ByteBuf out) |
static SslHandler.SslEngineType |
valueOf(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.
|
public static final SslHandler.SslEngineType JDK
final boolean wantsDirectBuffer
true
if and only if SSLEngine
expects a direct buffer.final ByteToMessageDecoder.Cumulator cumulator
SSLEngine
, we use ByteToMessageDecoder.MERGE_CUMULATOR
because it works only with
one ByteBuffer
.
When using OpenSslEngine
, we can use ByteToMessageDecoder.COMPOSITE_CUMULATOR
because it has
OpenSslEngine#unwrap(ByteBuffer[], ByteBuffer[])
which works with multiple ByteBuffer
s
and which does not need to do extra memory copies.public static SslHandler.SslEngineType[] values()
for (SslHandler.SslEngineType c : SslHandler.SslEngineType.values()) System.out.println(c);
public static SslHandler.SslEngineType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullstatic SslHandler.SslEngineType forEngine(javax.net.ssl.SSLEngine engine)
abstract javax.net.ssl.SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int readerIndex, int len, ByteBuf out) throws javax.net.ssl.SSLException
javax.net.ssl.SSLException
abstract int calculateWrapBufferCapacity(SslHandler handler, int pendingBytes, int numComponents)