Package io.micronaut.http.server
Class HttpServerConfiguration.FileTypeHandlerConfiguration
java.lang.Object
io.micronaut.http.server.HttpServerConfiguration.FileTypeHandlerConfiguration
- Enclosing class:
 - HttpServerConfiguration
 
@ConfigurationProperties("responses.file")
public static class HttpServerConfiguration.FileTypeHandlerConfiguration
extends Object
Allows configuration of properties for the 
io.micronaut.http.server.netty.body.AbstractFileBodyWriter.- Since:
 - 3.1.0
 - Author:
 - James Kleeh, graemerocher
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration for the Cache-Control header. - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default cache seconds. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintvoidsetCacheControl(HttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfiguration cacheControl) Sets the cache control configuration.voidsetCacheSeconds(int cacheSeconds) Cache Seconds. 
- 
Field Details
- 
DEFAULT_CACHESECONDS
public static final int DEFAULT_CACHESECONDSThe default cache seconds.- See Also:
 
 
 - 
 - 
Constructor Details
- 
FileTypeHandlerConfiguration
public FileTypeHandlerConfiguration()Default constructor. 
 - 
 - 
Method Details
- 
getCacheSeconds
public int getCacheSeconds()- Returns:
 - the cache seconds
 
 - 
setCacheSeconds
public void setCacheSeconds(int cacheSeconds) Cache Seconds. Default value (60).- Parameters:
 cacheSeconds- cache seconds
 - 
getCacheControl
public HttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfiguration getCacheControl()- Returns:
 - The cache control configuration
 
 - 
setCacheControl
public void setCacheControl(HttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfiguration cacheControl) Sets the cache control configuration.- Parameters:
 cacheControl- The cache control configuration
 
 -