类的使用
cn.taketoday.core.ReactiveTypeDescriptor
使用ReactiveTypeDescriptor的程序包
-
cn.taketoday.core中ReactiveTypeDescriptor的使用
修饰符和类型方法说明ReactiveAdapter.getDescriptor()Return the descriptor of the reactive type for the adapter.static ReactiveTypeDescriptorReactiveTypeDescriptor.multiValue(Class<?> type, Supplier<?> emptySupplier) Descriptor for a reactive type that can produce 0..N values.static ReactiveTypeDescriptorReactiveTypeDescriptor.nonDeferredAsyncValue(Class<?> type, Supplier<?> emptySupplier) The same assingleOptionalValue(Class, Supplier)but for a non-deferred, async type such asCompletableFuture.static ReactiveTypeDescriptorDescriptor for a reactive type that does not produce any values.static ReactiveTypeDescriptorReactiveTypeDescriptor.singleOptionalValue(Class<?> type, Supplier<?> emptySupplier) Descriptor for a reactive type that can produce 0..1 values.static ReactiveTypeDescriptorReactiveTypeDescriptor.singleRequiredValue(Class<?> type) Descriptor for a reactive type that must produce 1 value to complete.参数类型为ReactiveTypeDescriptor的cn.taketoday.core中的方法修饰符和类型方法说明voidReactiveAdapterRegistry.registerReactiveType(ReactiveTypeDescriptor descriptor, Function<Object, org.reactivestreams.Publisher<?>> toAdapter, Function<org.reactivestreams.Publisher<?>, Object> fromAdapter) Register a reactive type along with functions to adapt to and from a Reactive StreamsPublisher.参数类型为ReactiveTypeDescriptor的cn.taketoday.core中的构造器限定符构造器说明ReactiveAdapter(ReactiveTypeDescriptor descriptor, Function<Object, org.reactivestreams.Publisher<?>> toPublisherFunction, Function<org.reactivestreams.Publisher<?>, Object> fromPublisherFunction) Constructor for an adapter with functions to convert the target reactive or async type to and from a Reactive Streams Publisher.