Interface ResponseData<A>

Type Parameters:
A - the type of data
All Known Subinterfaces:
ResponseBody.Sse.Event<A>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ResponseData<A>

A generic response payload producer.

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

    Modifier and Type
    Method
    Description
    <T extends A>
    void
    stream(org.reactivestreams.Publisher<T> value)
    Sets the payload data.
    default <T extends A>
    void
    value(T value)
    Sets the specified data.
  • Method Details

    • stream

      <T extends A> void stream(org.reactivestreams.Publisher<T> value) throws IllegalStateException

      Sets the payload data.

      Type Parameters:
      T - the type of data
      Parameters:
      value - the data publisher
      Throws:
      IllegalStateException - if the payload has already been set
    • value

      default <T extends A> void value(T value) throws IllegalStateException

      Sets the specified data.

      Type Parameters:
      T - the type of data
      Parameters:
      value - the value to set
      Throws:
      IllegalStateException - if the payload has already been set