Package io.micronaut.servlet.http
Interface ServletResponseEncoder<T>
- Type Parameters:
T
- The response type
- All Known Implementing Classes:
AbstractFileEncoder
,FileEncoder
,StreamFileEncoder
,SystemFileEncoder
@Deprecated(forRemoval=true,
since="5.1.0")
@Indexed(ServletResponseEncoder.class)
public interface ServletResponseEncoder<T>
Deprecated, for removal: This API element is subject to removal in a future version.
An interface for custom encoding of the HTTP response.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
encode
(@NonNull ServletExchange<?, ?> exchange, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, T value) Deprecated, for removal: This API element is subject to removal in a future version.Encode the given value.Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
getResponseType
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The response type.
-
encode
org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> encode(@NonNull @NonNull ServletExchange<?, ?> exchange, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, @NonNull T value) Deprecated, for removal: This API element is subject to removal in a future version.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
-
ResponseBodyWriter