Class SystemFileEncoder
java.lang.Object
io.micronaut.servlet.http.encoders.AbstractFileEncoder<io.micronaut.http.server.types.files.SystemFile>
io.micronaut.servlet.http.encoders.SystemFileEncoder
- All Implemented Interfaces:
ServletResponseEncoder<io.micronaut.http.server.types.files.SystemFile>
@Singleton
public class SystemFileEncoder
extends AbstractFileEncoder<io.micronaut.http.server.types.files.SystemFile>
A
ServletResponseEncoder
for SystemFile
.- Since:
- 1.0.0
- Author:
- graemerocher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
encode
(@NonNull ServletExchange<?, ?> exchange, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, @NonNull io.micronaut.http.server.types.files.SystemFile value) Encode the given value.Class<io.micronaut.http.server.types.files.SystemFile>
Methods inherited from class io.micronaut.servlet.http.encoders.AbstractFileEncoder
ifNotModified, setDateAndCacheHeaders, setDateHeader
-
Constructor Details
-
SystemFileEncoder
-
SystemFileEncoder
public SystemFileEncoder()
-
-
Method Details
-
getResponseType
- Returns:
- The response type.
-
encode
public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> encode(@NonNull @NonNull ServletExchange<?, ?> exchange, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, @NonNull @NonNull io.micronaut.http.server.types.files.SystemFile value) Description copied from interface:ServletResponseEncoder
Encode the given value.- Parameters:
exchange
- The changeannotationMetadata
- The annotation metadata declared on the methodvalue
- The value to encode- Returns:
- A publisher that emits completes with the response once the value has been encoded
-