Class FileTypeHandler

    • Field Summary

      • Fields inherited from interface io.micronaut.core.order.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.netty.channel.ChannelFuture handle​(java.lang.Object obj, 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.
      protected void setDateAndCacheHeaders​(io.micronaut.http.MutableHttpResponse response, long lastModified)  
      protected void setDateHeader​(io.micronaut.http.MutableHttpResponse response)  
      boolean supports​(java.lang.Class<?> type)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.micronaut.core.order.Ordered

        getOrder
    • Method Detail

      • handle

        public io.netty.channel.ChannelFuture handle​(java.lang.Object obj,
                                                     io.micronaut.http.HttpRequest<?> request,
                                                     io.micronaut.http.MutableHttpResponse<?> response,
                                                     io.netty.channel.ChannelHandlerContext context)
        Description copied from interface: NettyCustomizableResponseTypeHandler
        Responsible for fully handling the response, including any closing of the channel.
        Specified by:
        handle in interface NettyCustomizableResponseTypeHandler<java.lang.Object>
        Parameters:
        obj - 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

        public boolean supports​(java.lang.Class<?> type)
        Specified by:
        supports in interface NettyCustomizableResponseTypeHandler<java.lang.Object>
        Parameters:
        type - The type to check
        Returns:
        True if the handler supports handling the given type
      • setDateAndCacheHeaders

        protected void setDateAndCacheHeaders​(io.micronaut.http.MutableHttpResponse response,
                                              long lastModified)
        Parameters:
        response - The Http response
        lastModified - The last modified
      • setDateHeader

        protected void setDateHeader​(io.micronaut.http.MutableHttpResponse response)
        Parameters:
        response - The Http response