public class JRouterHttpRequestHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
HttpServerActionFactory接受FullHttpRequest请求参数的处理类。| 限定符和类型 | 字段和说明 |
|---|---|
static char |
PATH_SEPARATOR
默认的路径分隔符
|
| 构造器和说明 |
|---|
JRouterHttpRequestHandler(HttpServerActionFactory httpServerActionFactory)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
protected String |
parseActionPath(io.netty.handler.codec.http.FullHttpRequest request)
A hook to give subclass another way to create Action's invoke path.
|
void |
setContextPath(String contextPath) |
protected void |
writeHttpResponse(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest request,
io.netty.handler.codec.http.FullHttpResponse response) |
protected void |
writeHttpResponse(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest request,
io.netty.handler.codec.http.FullHttpResponse response,
Object invokedRes) |
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic static final char PATH_SEPARATOR
public JRouterHttpRequestHandler(HttpServerActionFactory httpServerActionFactory)
httpServerActionFactory - HttpServerActionFactory object.public void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead 在接口中 io.netty.channel.ChannelInboundHandlerchannelRead 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionprotected String parseActionPath(io.netty.handler.codec.http.FullHttpRequest request)
request - FullHttpRequest object.protected void writeHttpResponse(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest request,
io.netty.handler.codec.http.FullHttpResponse response)
protected void writeHttpResponse(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest request,
io.netty.handler.codec.http.FullHttpResponse response,
Object invokedRes)
public void setContextPath(String contextPath)
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.