Class RouterHandler
- java.lang.Object
-
- org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerAdapter
-
- org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
-
- org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest>
-
- org.apache.flink.runtime.rest.handler.router.RouterHandler
-
- All Implemented Interfaces:
org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler
,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler
public class RouterHandler extends org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest>
Inbound handler that converts HttpRequest to Routed and passes Routed to the matched handler.This class replaces the standard error response to be identical with those sent by the
AbstractRestHandler
.This class is based on: https://github.com/sinetja/netty-router/blob/1.10/src/main/java/io/netty/handler/codec/http/router/AbstractHandler.java https://github.com/sinetja/netty-router/blob/1.10/src/main/java/io/netty/handler/codec/http/router/Handler.java
-
-
Constructor Summary
Constructors Constructor Description RouterHandler(Router router, Map<String,String> responseHeaders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
channelRead0(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext, org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest)
String
getName()
-
Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
-
Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Method Detail
-
getName
public String getName()
-
channelRead0
protected void channelRead0(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext, org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest)
- Specified by:
channelRead0
in classorg.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest>
-
-