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.
Now unused, use a normal ResponseBodyWriter
An interface for custom encoding of the HTTP response.
Since:
1.0.0
Author:
graemerocher
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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

      Class<T> 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 change
      annotationMetadata - The annotation metadata declared on the method
      value - The value to encode
      Returns:
      A publisher that emits completes with the response once the value has been encoded