Interface ReactiveEncoder<From,To>

Type Parameters:
From - the decoded type
To - the encoded type
All Superinterfaces:
Encoder<From,To>
All Known Subinterfaces:
MediaTypeConverter<From>, ReactiveConverter<A,B>
All Known Implementing Classes:
ByteBufConverter, JacksonByteBufConverter, JacksonStringConverter, JsonByteBufMediaTypeConverter, JsonStringMediaTypeConverter, NdJsonByteBufMediaTypeConverter, NdJsonStringMediaTypeConverter, TextByteBufMediaTypeConverter, TextStringMediaTypeConverter

public interface ReactiveEncoder<From,To> extends Encoder<From,To>

A reactive encoder.

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

    Modifier and Type
    Method
    Description
    <T extends From>
    Publisher<To>
    encodeMany(Flux<T> value)
    Encodes a flux stream of values to a stream of values.
    <T extends From>
    Publisher<To>
    encodeMany(Flux<T> value, Class<T> type)
    Encodes a flux stream of values whose type is represented by the specified class to a stream of values.
    <T extends From>
    Publisher<To>
    encodeMany(Flux<T> value, Type type)
    Encodes a flux stream of values whose type is the specified type to a stream of values.
    <T extends From>
    Publisher<To>
    encodeOne(Mono<T> value)
    Encodes a mono stream of values to a stream of values.
    <T extends From>
    Publisher<To>
    encodeOne(Mono<T> value, Class<T> type)
    Encodes a mono stream of values whose type is represented by the specified class to a stream of values.
    <T extends From>
    Publisher<To>
    encodeOne(Mono<T> value, Type type)
    Encodes a mono stream of values whose type is the specified type to a stream of values.

    Methods inherited from interface io.inverno.mod.base.converter.Encoder

    encode, encode, encode
  • Method Details

    • encodeOne

      <T extends From> Publisher<To> encodeOne(Mono<T> value)

      Encodes a mono stream of values to a stream of values.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the mono stream of values to encode
      Returns:
      a stream of encoded values
    • encodeOne

      <T extends From> Publisher<To> encodeOne(Mono<T> value, Class<T> type)

      Encodes a mono stream of values whose type is represented by the specified class to a stream of values.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the mono stream of values to encode
      type - the class of the decoded object
      Returns:
      a stream of encoded values
    • encodeOne

      <T extends From> Publisher<To> encodeOne(Mono<T> value, Type type)

      Encodes a mono stream of values whose type is the specified type to a stream of values.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the mono stream of values to encode
      type - the type of the decoded object
      Returns:
      a stream of encoded values
    • encodeMany

      <T extends From> Publisher<To> encodeMany(Flux<T> value)

      Encodes a flux stream of values to a stream of values.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the flux stream of values to encode
      Returns:
      a stream of encoded values
    • encodeMany

      <T extends From> Publisher<To> encodeMany(Flux<T> value, Class<T> type)

      Encodes a flux stream of values whose type is represented by the specified class to a stream of values.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the flux stream of values to encode
      type - the class of the decoded object
      Returns:
      a stream of encoded values
    • encodeMany

      <T extends From> Publisher<To> encodeMany(Flux<T> value, Type type)

      Encodes a flux stream of values whose type is the specified type to a stream of values.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the flux stream of values to encode
      type - the type of the decoded object
      Returns:
      a stream of encoded values