Class StreamFileEncoder
java.lang.Object
io.micronaut.servlet.http.encoders.AbstractFileEncoder<io.micronaut.http.server.types.files.StreamedFile>
io.micronaut.servlet.http.encoders.StreamFileEncoder
- All Implemented Interfaces:
ServletResponseEncoder<io.micronaut.http.server.types.files.StreamedFile>
@Singleton
public class StreamFileEncoder
extends AbstractFileEncoder<io.micronaut.http.server.types.files.StreamedFile>
A
ServletResponseEncoder
for StreamedFile
.- 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.StreamedFile value) Encode the given value.Class<io.micronaut.http.server.types.files.StreamedFile>
Methods inherited from class io.micronaut.servlet.http.encoders.AbstractFileEncoder
ifNotModified, setDateAndCacheHeaders, setDateHeader
-
Constructor Details
-
StreamFileEncoder
-
StreamFileEncoder
public StreamFileEncoder()
-
-
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.StreamedFile 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
-