- java.lang.Object
-
- io.netty5.channel.ChannelHandlerAdapter
-
- io.netty5.handler.codec.ByteToMessageDecoder
-
- io.netty5.handler.ssl.SslClientHelloHandler<T>
-
- All Implemented Interfaces:
ChannelHandler
- Direct Known Subclasses:
AbstractSniHandler
public abstract class SslClientHelloHandler<T> extends ByteToMessageDecoder
ByteToMessageDecoderwhich allows to be notified once a fullClientHellowas received.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty5.handler.codec.ByteToMessageDecoder
ByteToMessageDecoder.Cumulator
-
-
Field Summary
-
Fields inherited from class io.netty5.handler.codec.ByteToMessageDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
-
-
Constructor Summary
Constructors Constructor Description SslClientHelloHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddecode(ChannelHandlerContext ctx, Buffer in)Decode the from oneBufferto another.protected voidhandlerRemoved0(ChannelHandlerContext ctx)Gets called after theByteToMessageDecoderwas removed from the actual context and it doesn't handle events anymore.protected abstract Future<T>lookup(ChannelHandlerContext ctx, Buffer clientHello)Kicks off a lookup for the givenClientHelloand returns aFuturewhich in turn will notify theonLookupComplete(ChannelHandlerContext, Future)on completion.protected abstract voidonLookupComplete(ChannelHandlerContext ctx, Future<? extends T> future)Called upon completion of thelookup(ChannelHandlerContext, Buffer)Future.voidread(ChannelHandlerContext ctx)InterceptsChannelHandlerContext.read().-
Methods inherited from class io.netty5.handler.codec.ByteToMessageDecoder
actualReadableBytes, channelInactive, channelRead, channelReadComplete, channelShutdown, decodeLast, discardSomeReadBytes, handlerAdded, handlerAdded0, handlerRemoved, internalBuffer, isSharable, isSingleDecode, setSingleDecode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty5.channel.ChannelHandler
bind, channelActive, channelExceptionCaught, channelInboundEvent, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, flush, pendingOutboundBytes, register, sendOutboundEvent, shutdown, write
-
-
-
-
Method Detail
-
decode
protected void decode(ChannelHandlerContext ctx, Buffer in) throws Exception
Description copied from class:ByteToMessageDecoderDecode the from oneBufferto another. This method will be called till either the inputBufferhas nothing to read when return from this method or till nothing was read from the inputBuffer.- Specified by:
decodein classByteToMessageDecoder- Parameters:
ctx- theChannelHandlerContextwhich thisByteToMessageDecoderbelongs toin- theBufferfrom which to read data- Throws:
Exception- is thrown if an error occurs
-
handlerRemoved0
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception
Description copied from class:ByteToMessageDecoderGets called after theByteToMessageDecoderwas removed from the actual context and it doesn't handle events anymore.- Overrides:
handlerRemoved0in classByteToMessageDecoder- Throws:
Exception
-
lookup
protected abstract Future<T> lookup(ChannelHandlerContext ctx, Buffer clientHello) throws Exception
Kicks off a lookup for the givenClientHelloand returns aFuturewhich in turn will notify theonLookupComplete(ChannelHandlerContext, Future)on completion. See https://tools.ietf.org/html/rfc5246#section-7.4.1.2struct { ProtocolVersion client_version; Random random; SessionID session_id; CipherSuite cipher_suites<2..2^16-2>; CompressionMethod compression_methods<1..2^8-1>; select (extensions_present) { case false: struct {}; case true: Extension extensions<0..2^16-1>; }; } ClientHello;- Throws:
Exception- See Also:
onLookupComplete(ChannelHandlerContext, Future)
-
onLookupComplete
protected abstract void onLookupComplete(ChannelHandlerContext ctx, Future<? extends T> future) throws Exception
Called upon completion of thelookup(ChannelHandlerContext, Buffer)Future.- Throws:
Exception- See Also:
lookup(ChannelHandlerContext, Buffer)
-
read
public void read(ChannelHandlerContext ctx)
Description copied from interface:ChannelHandlerInterceptsChannelHandlerContext.read().
-
-