Class PipeliningServerHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.micronaut.http.server.netty.handler.PipeliningServerHandler
- All Implemented Interfaces:
io.micronaut.runtime.graceful.GracefulShutdownCapable, io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler
@Internal
public final class PipeliningServerHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
implements io.micronaut.runtime.graceful.GracefulShutdownCapable
Netty handler that handles incoming
HttpRequests and forwards them to a
RequestHandler.- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classClass that allows writing the response for the request this object is associated with.Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanHaveBody(io.netty.handler.codec.http.HttpResponseStatus status) voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) voidchannelReadComplete(io.netty.channel.ChannelHandlerContext ctx) voidchannelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) voidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx) voidsetBodySizeLimits(io.micronaut.http.body.stream.BodySizeLimits bodySizeLimits) voidsetCompressionStrategy(HttpCompressionStrategy compressionStrategy) voidsetRequestDecompressionEnabled(boolean requestDecompressionEnabled) Enable or disable automatic request content decompression in the Netty HTTP server.voiduserEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregisteredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
PipeliningServerHandler
-
-
Method Details
-
setCompressionStrategy
-
setBodySizeLimits
public void setBodySizeLimits(io.micronaut.http.body.stream.BodySizeLimits bodySizeLimits) -
setRequestDecompressionEnabled
public void setRequestDecompressionEnabled(boolean requestDecompressionEnabled) Enable or disable automatic request content decompression in the Netty HTTP server. When disabled, the server will not decode Content-Encoding or Transfer-Encoding on requests and will pass the compressed body and headers through unchanged. Default: true.- Parameters:
requestDecompressionEnabled- true to enable decompression, false to disable it
-
canHaveBody
public static boolean canHaveBody(io.netty.handler.codec.http.HttpResponseStatus status) -
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerAddedin classio.netty.channel.ChannelHandlerAdapter
-
handlerRemoved
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerRemovedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerRemovedin classio.netty.channel.ChannelHandlerAdapter
-
channelRead
-
channelReadComplete
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelReadCompletein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadCompletein classio.netty.channel.ChannelInboundHandlerAdapter
-
exceptionCaught
- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-
channelWritabilityChanged
public void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelWritabilityChangedin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelWritabilityChangedin classio.netty.channel.ChannelInboundHandlerAdapter
-
userEventTriggered
-
reportActiveTasks
- Specified by:
reportActiveTasksin interfaceio.micronaut.runtime.graceful.GracefulShutdownCapable
-
shutdownGracefully
- Specified by:
shutdownGracefullyin interfaceio.micronaut.runtime.graceful.GracefulShutdownCapable
-