Class TypedPublisher<T>

  • Type Parameters:
    T - the type of the data inside the wrapped stream.
    All Implemented Interfaces:
    org.reactivestreams.Publisher<T>

    public class TypedPublisher<T>
    extends Object
    implements org.reactivestreams.Publisher<T>
    A publisher wrapper carrying information about the class type of the stream content. This is needed to properly convert results from the evaluation of a script to the correct desired type.
    • Method Detail

      • from

        public static <T> TypedPublisher<T> from​(org.reactivestreams.Publisher<T> delegate,
                                                 Class<T> clazz)
      • fromByteArray

        public static TypedPublisher<byte[]> fromByteArray​(org.reactivestreams.Publisher<byte[]> delegate)
      • fromObject

        public static <T> TypedPublisher<T> fromObject​(org.reactivestreams.Publisher<T> delegate,
                                                       Class<T> clazz)
      • subscribe

        public void subscribe​(org.reactivestreams.Subscriber<? super T> subscriber)
        Specified by:
        subscribe in interface org.reactivestreams.Publisher<T>
      • getType

        public Class<T> getType()