@Internal public class FileTypeHandler extends java.lang.Object implements NettyCustomizableResponseTypeHandler<java.lang.Object>
| Constructor and Description |
|---|
FileTypeHandler(NettyHttpServerConfiguration.FileTypeHandlerConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
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) |
public FileTypeHandler(NettyHttpServerConfiguration.FileTypeHandlerConfiguration configuration)
configuration - The file type handler configurationpublic void handle(java.lang.Object obj,
io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse<?> response,
io.netty.channel.ChannelHandlerContext context)
NettyCustomizableResponseTypeHandlerhandle in interface NettyCustomizableResponseTypeHandler<java.lang.Object>obj - The object to be handledrequest - The native Netty requestresponse - The mutable Micronaut responsecontext - The channel contextpublic boolean supports(java.lang.Class<?> type)
supports in interface NettyCustomizableResponseTypeHandler<java.lang.Object>type - The type to checkprotected void setDateAndCacheHeaders(io.micronaut.http.MutableHttpResponse response,
long lastModified)
response - The Http responselastModified - The last modifiedprotected void setDateHeader(io.micronaut.http.MutableHttpResponse response)
response - The Http response