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.SniHandlerHandler responsible for routing requests to proper backend based on SNI Host Name.- Author:
- Sebastian Ćaskawiec
-
-
Constructor Summary
Constructors Constructor Description SniRouteHandler(io.netty.util.DomainNameMapping<? extends io.netty.handler.ssl.SslContext> mapping, RoutingTable routingTable)Creates newSniRouteHandlerbased on SNI Domain mapping and theRoutingTable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out)booleanisHandShaked()Returntrueif handshake was successful.-
Methods inherited from class io.netty.handler.ssl.SniHandler
hostname, lookup, newSslHandler, onLookupComplete, replaceHandler, sslContext
-
Methods inherited from class io.netty.handler.ssl.SslClientHelloHandler
bind, close, connect, deregister, disconnect, flush, handlerRemoved0, read, write
-
Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
-
-
-
-
Constructor Detail
-
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 Detail
-
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.
-
-