public class ReactiveAdapter extends ObjectSE
CompletableFuture、RxJava Observable などの非同期 / リアクティブ型との間の Reactive Streams Publisher のアダプター。 アダプターは通常、ReactiveAdapterRegistry を介して取得されます。
| コンストラクターと説明 |
|---|
ReactiveAdapter(ReactiveTypeDescriptor descriptor, FunctionSE<ObjectSE,org.reactivestreams.Publisher<?>> toPublisherFunction, FunctionSE<org.reactivestreams.Publisher<?>,ObjectSE> fromPublisherFunction) ターゲットのリアクティブ型または非同期型を Reactive Streams パブリッシャーとの間で変換する機能を持つアダプターのコンストラクター。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
ObjectSE | fromPublisher(org.reactivestreams.Publisher<?> publisher) 指定された Reactive Streams パブリッシャーから適応します。 |
ReactiveTypeDescriptor | getDescriptor() アダプターのリアクティブ型の記述子を返します。 |
ClassSE<?> | getReactiveType()getDescriptor().getReactiveType() のショートカット。 |
boolean | isMultiValue()getDescriptor().isMultiValue() のショートカット。 |
boolean | isNoValue()getDescriptor().isNoValue() のショートカット。 |
boolean | supportsEmpty()getDescriptor().supportsEmpty() のショートカット。 |
<T> org.reactivestreams.Publisher<T> | toPublisher(ObjectSE source) 指定されたインスタンスを Reactive Streams Publisher に適合させます。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic ReactiveAdapter(ReactiveTypeDescriptor descriptor, FunctionSE<ObjectSE,org.reactivestreams.Publisher<?>> toPublisherFunction, FunctionSE<org.reactivestreams.Publisher<?>,ObjectSE> fromPublisherFunction)
descriptor - リアクティブ型記述子 toPublisherFunction - パブリッシャーへのアダプター fromPublisherFunction - パブリッシャーからのアダプター public ReactiveTypeDescriptor getDescriptor()
public ClassSE<?> getReactiveType()
getDescriptor().getReactiveType() のショートカット。public boolean isMultiValue()
getDescriptor().isMultiValue() のショートカット。public boolean isNoValue()
getDescriptor().isNoValue() のショートカット。public boolean supportsEmpty()
getDescriptor().supportsEmpty() のショートカット。public <T> org.reactivestreams.Publisher<T> toPublisher(@Nullable ObjectSE source)
Publisher に適合させます。source - 適応するソースオブジェクト。指定されたオブジェクトが null の場合、ReactiveTypeDescriptor.getEmptyValue() が使用されます。public ObjectSE fromPublisher(org.reactivestreams.Publisher<?> publisher)
publisher - 適応するパブリッシャー