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 Details

    • SystemFileEncoder

      @Inject public SystemFileEncoder(@Nullable @Nullable ServletConfiguration servletConfiguration)
    • SystemFileEncoder

      public SystemFileEncoder()
  • Method Details

    • getResponseType

      public Class<io.micronaut.http.server.types.files.SystemFile> 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 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