
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, channelReadchannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic 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>Exceptionprotected 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.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic R66Session getAuthentHttp()
Copyright © 2009–2020 Waarp. All rights reserved.