Interface NettyCustomizableResponseTypeHandler<T>
- Type Parameters:
T
- The type to be handled
- All Superinterfaces:
Ordered
- All Known Implementing Classes:
FileTypeHandler
@Internal
@Indexed(NettyCustomizableResponseTypeHandler.class)
public interface NettyCustomizableResponseTypeHandler<T>
extends Ordered
Represents a class that is designed to handle specific types that are returned from routes in a netty specific way.
- Since:
- 1.0
- Author:
- James Kleeh
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.channel.ChannelFuture
handle
(T object, HttpRequest<?> request, MutableHttpResponse<?> response, io.netty.channel.ChannelHandlerContext context) Responsible for fully handling the response, including any closing of the channel.boolean
-
Method Details
-
handle
io.netty.channel.ChannelFuture handle(T object, HttpRequest<?> request, MutableHttpResponse<?> response, io.netty.channel.ChannelHandlerContext context) Responsible for fully handling the response, including any closing of the channel.- Parameters:
object
- The object to be handledrequest
- The native Netty requestresponse
- The mutable Micronaut responsecontext
- The channel context- Returns:
- The channel future that completes when the response is fully written.
-
supports
- Parameters:
type
- The type to check- Returns:
- True if the handler supports handling the given type
-