Class ReactiveTypeDescriptor

    • Method Detail

      • isMultiValue

        public boolean isMultiValue()
        Return true if the reactive type can produce more than 1 value can be produced and is therefore a good fit to adapt to Flux. A false return value implies the reactive type can produce 1 value at most and is therefore a good fit to adapt to Mono.
      • isNoValue

        public boolean isNoValue()
        Return true if the reactive type does not produce any values and only provides completion and error signals.
      • supportsEmpty

        public boolean supportsEmpty()
        Return true if the reactive type can complete with no values.
      • isDeferred

        public boolean isDeferred()
        Whether the underlying operation is deferred and needs to be started explicitly, e.g. via subscribing (or similar), or whether it is triggered without the consumer having any control.
        Since:
        5.2.7
      • multiValue

        public static ReactiveTypeDescriptor multiValue​(Class<?> type,
                                                        Supplier<?> emptySupplier)
        Descriptor for a reactive type that can produce 0..N values.
        Parameters:
        type - the reactive type
        emptySupplier - a supplier of an empty-value instance of the reactive type
      • singleOptionalValue

        public static ReactiveTypeDescriptor singleOptionalValue​(Class<?> type,
                                                                 Supplier<?> emptySupplier)
        Descriptor for a reactive type that can produce 0..1 values.
        Parameters:
        type - the reactive type
        emptySupplier - a supplier of an empty-value instance of the reactive type
      • noValue

        public static ReactiveTypeDescriptor noValue​(Class<?> type,
                                                     Supplier<?> emptySupplier)
        Descriptor for a reactive type that does not produce any values.
        Parameters:
        type - the reactive type
        emptySupplier - a supplier of an empty-value instance of the reactive type