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
Modifier and TypeClassDescriptionstatic class
Configuration for the Cache-Control header. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default cache seconds. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
setCacheControl
(HttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfiguration cacheControl) Sets the cache control configuration.void
setCacheSeconds
(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
-