Interface OutboundDataEncoder<A>

Type Parameters:
A - the type of the object to encode
All Superinterfaces:
OutboundData<A>
All Known Subinterfaces:
WebResponseBody.SseEncoder.Event<A>

public interface OutboundDataEncoder<A> extends OutboundData<A>

A response payload producer used to encode the payload from a single object or many objects.

Implementors should rely on a MediaTypeConverter to encode a payload as a publisher of objects to a raw payload as a publisher of ByteBuf.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends A>
    void
    many(Flux<T> value)
    Encodes many objects.
    <T extends A>
    void
    one(Mono<T> value)
    Encodes one object.

    Methods inherited from interface io.inverno.mod.http.base.OutboundData

    stream, value
  • Method Details

    • many

      <T extends A> void many(Flux<T> value)

      Encodes many objects.

      Type Parameters:
      T - the type of the object to encode
      Parameters:
      value - a flux emitting the objects to encode
    • one

      <T extends A> void one(Mono<T> value)

      Encodes one object.

      Type Parameters:
      T - the type of the object to encode
      Parameters:
      value - a mono emitting the object to encode