Interface StreamWriter<T>

Type Parameters:
T - the type of the stream element
All Superinterfaces:
org.reactivestreams.Publisher<T>, StreamMessage<T>
All Known Subinterfaces:
HttpRequestWriter, HttpResponseWriter, WebSocketWriter
All Known Implementing Classes:
DefaultStreamMessage

public interface StreamWriter<T> extends StreamMessage<T>
Produces the objects to be published by a StreamMessage.

Life cycle of reference-counted objects

When the following methods are given with a pooled HttpData or the Supplier that provides such an object:

the object will be released automatically by the stream when it's no longer in use, such as when:
  • The method returns false or raises an exception.
  • The Subscriber of the stream consumes it.
  • The stream is cancelled, aborted or failed.