Class RestMulti.SyncRestMulti.Builder<T>

java.lang.Object
org.jboss.resteasy.reactive.RestMulti.SyncRestMulti.Builder<T>
Enclosing class:
RestMulti.SyncRestMulti<T>

public static class RestMulti.SyncRestMulti.Builder<T> extends Object
  • Method Details

    • withDemand

      public RestMulti.SyncRestMulti.Builder<T> withDemand(long demand)
      Configure the demand signaled to the wrapped Multi, defaults to 1.

      A demand of 1 guarantees serial/sequential processing, any higher demand supports concurrent processing. A demand greater 1, with concurrent Multi processing, does not guarantee element order - this means that elements emitted by the RestMulti.fromMultiData(Multi) source Multi} will be produced in a non-deterministic order.

      See Also:
      • Multi.createBy().merging().withConcurrency(int)
      • Multi.capDemandsTo(long)
      • Multi.capDemandsUsing(LongFunction)
    • encodeAsJsonArray

      public RestMulti.SyncRestMulti.Builder<T> encodeAsJsonArray(boolean encodeAsJsonArray)
      Configure whether objects produced by the wrapped Multi are encoded as JSON array elements, which is the default.

      encodeAsJsonArray(false) produces separate JSON objects.

      This property is only used for JSON object results and ignored for SSE and chunked streaming.

    • status

      public RestMulti.SyncRestMulti.Builder<T> status(int status)
    • header

      public RestMulti.SyncRestMulti.Builder<T> header(String name, String value)
    • build

      public RestMulti<T> build()