Interface NettyCustomizableResponseTypeHandler<T>
-
- Type Parameters:
T- The type to be handled
- All Superinterfaces:
io.micronaut.core.order.Ordered
- All Known Implementing Classes:
FileTypeHandler
@Internal @Indexed(NettyCustomizableResponseTypeHandler.class) public interface NettyCustomizableResponseTypeHandler<T> extends io.micronaut.core.order.Ordered
Represents a class that is designed to handle specific types that are returned from routes in a netty specific way.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.netty.channel.ChannelFuturehandle(T object, io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse<?> response, io.netty.channel.ChannelHandlerContext context)Responsible for fully handling the response, including any closing of the channel.booleansupports(java.lang.Class<?> type)
-
-
-
Method Detail
-
handle
io.netty.channel.ChannelFuture handle(T object, io.micronaut.http.HttpRequest<?> request, io.micronaut.http.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
boolean supports(java.lang.Class<?> type)
- Parameters:
type- The type to check- Returns:
- True if the handler supports handling the given type
-
-