Class NettyHttpServerConfiguration.FileTypeHandlerConfiguration
- java.lang.Object
-
- io.micronaut.http.server.netty.configuration.NettyHttpServerConfiguration.FileTypeHandlerConfiguration
-
- Enclosing class:
- NettyHttpServerConfiguration
@ConfigurationProperties("responses.file") public static class NettyHttpServerConfiguration.FileTypeHandlerConfiguration extends java.lang.ObjectAllows configuration of properties for theFileTypeHandler.- Since:
- 3.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNettyHttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfigurationConfiguration for the Cache-Control header.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CACHESECONDSThe default cache seconds.
-
Constructor Summary
Constructors Constructor Description FileTypeHandlerConfiguration()Default constructor.FileTypeHandlerConfiguration(java.lang.Integer cacheSeconds, java.lang.Boolean isPublic)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NettyHttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfigurationgetCacheControl()intgetCacheSeconds()voidsetCacheControl(NettyHttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfiguration cacheControl)Sets the cache control configuration.voidsetCacheSeconds(int cacheSeconds)Cache Seconds.
-
-
-
Field Detail
-
DEFAULT_CACHESECONDS
public static final int DEFAULT_CACHESECONDS
The default cache seconds.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileTypeHandlerConfiguration
public FileTypeHandlerConfiguration()
Default constructor.
-
FileTypeHandlerConfiguration
@Deprecated @Inject public FileTypeHandlerConfiguration(@Nullable @Property(name="netty.responses.file.cache-seconds") java.lang.Integer cacheSeconds, @Nullable @Property(name="netty.responses.file.cache-control.public") java.lang.Boolean isPublic)Deprecated.Deprecated constructor.- Parameters:
cacheSeconds- Deprecated constructor parameterisPublic- Deprecated constructor parameter
-
-
Method Detail
-
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 NettyHttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfiguration getCacheControl()
- Returns:
- The cache control configuration
-
setCacheControl
public void setCacheControl(NettyHttpServerConfiguration.FileTypeHandlerConfiguration.CacheControlConfiguration cacheControl)
Sets the cache control configuration.- Parameters:
cacheControl- The cache control configuration
-
-