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 Object
Allows configuration of properties for the
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
ConstructorDescriptionDefault constructor.FileTypeHandlerConfiguration
(@Nullable Integer cacheSeconds, @Nullable Boolean isPublic) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionint
void
setCacheControl
(NettyHttpServerConfiguration.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. -
FileTypeHandlerConfiguration
@Deprecated @Inject public FileTypeHandlerConfiguration(@Nullable @Property(name="netty.responses.file.cache-seconds") @Nullable Integer cacheSeconds, @Nullable @Property(name="netty.responses.file.cache-control.public") @Nullable Boolean isPublic) Deprecated.Deprecated constructor.- Parameters:
cacheSeconds
- Deprecated constructor parameterisPublic
- Deprecated constructor parameter
-
-
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 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
-