public class NettyHttpServerHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
| Constructor and Description |
|---|
NettyHttpServerHandler(INettyReaderCallback<Map<String,Object>> receiver,
com.codahale.metrics.Counter strBytesRec,
com.codahale.metrics.Counter strBytesSent,
boolean directResponse,
int multipartDecoderBufferSize)
Ctor
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
static Map<String,Object> |
decodeMultiPart(int bufferSize,
Map<String,Object> requestData)
If required replace the content by a decoded document containing the byte arrays
for each multipart.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic NettyHttpServerHandler(INettyReaderCallback<Map<String,Object>> receiver, com.codahale.metrics.Counter strBytesRec, com.codahale.metrics.Counter strBytesSent, boolean directResponse, int multipartDecoderBufferSize)
receiver - the callbackstrBytesRec - a counterstrBytesSent - a counterdirectResponse - true to send directly the responsemultipartDecoderBufferSize - size or preaalocated memory to decode post contentpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterpublic static Map<String,Object> decodeMultiPart(int bufferSize, Map<String,Object> requestData)
bufferSize - the maximal allowed multipart sizerequestData - the current request Datapublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterCopyright © 2023. All rights reserved.