Class SniRouteHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.ByteToMessageDecoder
io.netty.handler.ssl.SslClientHelloHandler<T>
io.netty.handler.ssl.AbstractSniHandler<io.netty.handler.ssl.SslContext>
io.netty.handler.ssl.SniHandler
org.infinispan.server.router.router.impl.hotrod.handlers.SniRouteHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
public class SniRouteHandler
extends io.netty.handler.ssl.SniHandler
Handler responsible for routing requests to proper backend based on SNI Host Name.
- Author:
- Sebastian Ćaskawiec
-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.handler.codec.ByteToMessageDecoder
io.netty.handler.codec.ByteToMessageDecoder.CumulatorNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from class io.netty.handler.ssl.SniHandler
mappingFields inherited from class io.netty.handler.codec.ByteToMessageDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR -
Constructor Summary
ConstructorsConstructorDescriptionSniRouteHandler(io.netty.util.DomainNameMapping<? extends io.netty.handler.ssl.SslContext> mapping, RoutingTable routingTable) Creates newSniRouteHandlerbased on SNI Domain mapping and theRoutingTable. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleanReturntrueif handshake was successful.Methods inherited from class io.netty.handler.ssl.SniHandler
hostname, lookup, newSslHandler, onLookupComplete, replaceHandler, sslContextMethods inherited from class io.netty.handler.ssl.AbstractSniHandler
lookup, onLookupCompleteMethods inherited from class io.netty.handler.ssl.SslClientHelloHandler
bind, close, connect, deregister, disconnect, flush, handlerRemoved0, read, writeMethods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
SniRouteHandler
public SniRouteHandler(io.netty.util.DomainNameMapping<? extends io.netty.handler.ssl.SslContext> mapping, RoutingTable routingTable) Creates newSniRouteHandlerbased on SNI Domain mapping and theRoutingTable.- Parameters:
mapping- SNI Host Name mapping.routingTable- TheRoutingTablefor supplying theRoutes.
-
-
Method Details
-
decode
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out) throws Exception - Overrides:
decodein classio.netty.handler.ssl.SslClientHelloHandler<io.netty.handler.ssl.SslContext>- Throws:
Exception
-
isHandShaked
public boolean isHandShaked()Returntrueif handshake was successful.
-