Interface HttpMessageWriter<T>

    • Method Detail

      • getWritableMediaTypes

        java.util.List<MediaType> getWritableMediaTypes()
        Return the MediaType's that this writer supports.
      • canWrite

        boolean canWrite(ResolvableType elementType,
                         MediaType mediaType)
        Whether the given object type is supported by this writer.
        elementType - the type of object to check
        mediaType - the media type for the write, possibly null
        true if writable, false otherwise
      • write

        reactor.core.publisher.Mono<java.lang.Void> write(org.reactivestreams.Publisher<? extends T> inputStream,
                                                          ResolvableType elementType,
                                                          MediaType mediaType,
                                                          ReactiveHttpOutputMessage message,
                                                          java.util.Map<java.lang.String,java.lang.Object> hints)
        Write an given stream of object to the output message.
        inputStream - the objects to write
        elementType - the type of objects in the stream which must have been previously checked via canWrite(ResolvableType, MediaType)
        mediaType - the content type for the write, possibly null to indicate that the default content type of the writer must be used.
        message - the message to write to
        hints - additional information about how to encode and write
        indicates completion or error