public class HttpRequestHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpRequestHandler.ChunkedTransferStats |
| Modifier and Type | Field and Description |
|---|---|
static io.netty.util.AttributeKey<HttpRequestHandler.ChunkedTransferStats> |
CTX_CHUNK_STATS |
| Constructor and Description |
|---|
HttpRequestHandler(Router apiRouter) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest req) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
static io.netty.channel.ChannelFuture |
sendError(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
io.netty.handler.codec.http.HttpResponse response) |
static io.netty.channel.ChannelFuture |
sendOK(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
io.netty.handler.codec.http.HttpResponse response) |
static io.netty.channel.ChannelFuture |
sendPlainTextError(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
io.netty.handler.codec.http.HttpResponseStatus status) |
io.netty.channel.ChannelFuture |
sendRedirect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
String newUri) |
static io.netty.channel.ChannelFuture |
startChunkedTransfer(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
MediaType contentType,
String filename)
Sends base HTTP response indicating the use of chunked transfer encoding
|
static io.netty.channel.ChannelFuture |
writeChunk(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf buf) |
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic static final io.netty.util.AttributeKey<HttpRequestHandler.ChunkedTransferStats> CTX_CHUNK_STATS
public HttpRequestHandler(Router apiRouter)
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest req)
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>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 io.netty.channel.ChannelFuture sendRedirect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
String newUri)
public static io.netty.channel.ChannelFuture sendPlainTextError(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
io.netty.handler.codec.http.HttpResponseStatus status)
public static io.netty.channel.ChannelFuture sendError(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
io.netty.handler.codec.http.HttpResponse response)
public static io.netty.channel.ChannelFuture sendOK(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
io.netty.handler.codec.http.HttpResponse response)
public static io.netty.channel.ChannelFuture startChunkedTransfer(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
MediaType contentType,
String filename)
public static io.netty.channel.ChannelFuture writeChunk(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf buf)
throws IOException
IOExceptionCopyright © 2017 Space Applications Services. All rights reserved.