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 Type
    Method
    Description
    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.
    boolean
    supports(Class<?> type)
     

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • 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 handled
      request - The native Netty request
      response - The mutable Micronaut response
      context - The channel context
      Returns:
      The channel future that completes when the response is fully written.
    • supports

      boolean supports(Class<?> type)
      Parameters:
      type - The type to check
      Returns:
      True if the handler supports handling the given type