@ChannelHandler.Sharable
public class HistoryServerStaticFileServerHandler
extends org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.flink.runtime.rest.handler.router.RoutedRequest>
HistoryServer that serves requests to web
frontend's static files, such as HTML, CSS, JS or JSON files.
This code is based on the "HttpStaticFileServerHandler" from the Netty project's HTTP server example.
This class is a copy of the StaticFileServerHandler. The differences are that the
request path is modified to end on ".json" if it does not have a filename extension; when
"index.html" is requested we load "index_hs.html" instead to inject the modified HistoryServer
WebInterface and that the caching of the "/joboverview" page is prevented.
| 构造器和说明 |
|---|
HistoryServerStaticFileServerHandler(File rootPath) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
channelRead0(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx,
org.apache.flink.runtime.rest.handler.router.RoutedRequest routedRequest) |
void |
exceptionCaught(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic HistoryServerStaticFileServerHandler(File rootPath) throws IOException
IOExceptionpublic void channelRead0(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx,
org.apache.flink.runtime.rest.handler.router.RoutedRequest routedRequest)
throws Exception
channelRead0 在类中 org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.flink.runtime.rest.handler.router.RoutedRequest>Exceptionpublic void exceptionCaught(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught 在接口中 org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerexceptionCaught 在接口中 org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerexceptionCaught 在类中 org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapterCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.