public class HttpFormattedHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
Modifier and Type | Class and Description |
---|---|
protected static class |
HttpFormattedHandler.REPLACEMENT |
Modifier and Type | Field and Description |
---|---|
protected boolean |
isCurrentRequestJson |
protected boolean |
isCurrentRequestXml |
protected String |
lang |
static int |
LIMITROW |
protected Map<String,List<String>> |
params |
protected io.netty.handler.codec.http.FullHttpRequest |
request |
protected StringBuilder |
responseContent |
protected io.netty.handler.codec.http.HttpResponseStatus |
status |
protected String |
uriRequest |
Constructor and Description |
---|
HttpFormattedHandler() |
Modifier and Type | Method and Description |
---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
R66Session |
getAuthentHttp() |
protected String |
getTrimValue(String varname) |
protected void |
sendError(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpResponseStatus status)
Send an error and close
|
protected void |
statusjson(io.netty.channel.ChannelHandlerContext ctx,
long nb,
boolean detail)
print only status
|
protected void |
statusxml(io.netty.channel.ChannelHandlerContext ctx,
long nb,
boolean detail)
print only status
|
protected void |
writeResponse(io.netty.channel.ChannelHandlerContext ctx)
Write the response
|
acceptInboundMessage, channelRead
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public static final int LIMITROW
protected String lang
protected io.netty.handler.codec.http.FullHttpRequest request
protected final StringBuilder responseContent
protected io.netty.handler.codec.http.HttpResponseStatus status
protected String uriRequest
protected boolean isCurrentRequestXml
protected boolean isCurrentRequestJson
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest msg) throws Exception
channelRead0
in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
Exception
protected void statusxml(io.netty.channel.ChannelHandlerContext ctx, long nb, boolean detail)
ctx
- nb
- protected void statusjson(io.netty.channel.ChannelHandlerContext ctx, long nb, boolean detail)
ctx
- nb
- protected void writeResponse(io.netty.channel.ChannelHandlerContext ctx)
ctx
- protected void sendError(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpResponseStatus status)
ctx
- status
- public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public R66Session getAuthentHttp()
Copyright © 2009–2020 Waarp. All rights reserved.