Interface StreamWriter<T>

Type Parameters:
T - the type of the stream element
All Known Subinterfaces:
HttpRequestWriter, HttpResponseWriter
All Known Implementing Classes:
DefaultStreamMessage

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

Life cycle of reference-counted objects

When the following methods are given with a ReferenceCounted object, such as ByteBuf and ByteBufHttpData, 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.