public final class ReactiveWrappers extends Object
Supported types are discovered by their availability on the class path. This class is typically used to determine multiplicity and whether a reactive wrapper type is acceptable for a specific operation.
Publisher
,
Single
,
Observable
,
Completable
,
Single
,
Maybe
,
Observable
,
Completable
,
Flowable
,
Mono
,
Flux
Modifier and Type | Class and Description |
---|---|
static class |
ReactiveWrappers.ReactiveLibrary
Enumeration of supported reactive libraries.
|
Modifier and Type | Method and Description |
---|---|
static Collection<Class<?>> |
getMultiValueTypes()
Returns a collection of multi-value wrapper types.
|
static Collection<Class<?>> |
getNoValueTypes()
Returns a collection of no-value wrapper types.
|
static Collection<Class<?>> |
getSingleValueTypes()
Returns a collection of single-value wrapper types.
|
static boolean |
isAvailable()
Returns true if reactive support is available.
|
static boolean |
isAvailable(ReactiveWrappers.ReactiveLibrary reactiveLibrary)
Returns true if the
ReactiveWrappers.ReactiveLibrary is available. |
static boolean |
isMultiValueType(Class<?> type)
Returns true if
type is a reactive wrapper type supporting multiple values (0..N
elements). |
static boolean |
isNoValueType(Class<?> type)
Returns true if
type is a reactive wrapper type that contains no value. |
static boolean |
isSingleValueType(Class<?> type)
Returns true if
type is a reactive wrapper type for a single value. |
static boolean |
supports(Class<?> type)
Returns true if the
type is a supported reactive wrapper type. |
static boolean |
usesReactiveType(Class<?> type)
Returns whether the given type uses any reactive wrapper type in its method signatures.
|
public static boolean isAvailable()
ReactiveWrappers.ReactiveLibrary
are on the class path.public static boolean isAvailable(ReactiveWrappers.ReactiveLibrary reactiveLibrary)
ReactiveWrappers.ReactiveLibrary
is available.reactiveLibrary
- must not be null.ReactiveWrappers.ReactiveLibrary
is available.public static boolean supports(Class<?> type)
type
is a supported reactive wrapper type.type
- must not be null.type
is a supported reactive wrapper type.public static boolean usesReactiveType(Class<?> type)
type
- must not be null.public static boolean isNoValueType(Class<?> type)
type
is a reactive wrapper type that contains no value.type
- must not be null.type
is a reactive wrapper type that contains no value.public static boolean isSingleValueType(Class<?> type)
type
is a reactive wrapper type for a single value.type
- must not be null.type
is a reactive wrapper type for a single value.public static boolean isMultiValueType(Class<?> type)
type
is a reactive wrapper type supporting multiple values (0..N
elements).type
- must not be null.type
is a reactive wrapper type supporting multiple values (0..N
elements).public static Collection<Class<?>> getNoValueTypes()
public static Collection<Class<?>> getSingleValueTypes()
public static Collection<Class<?>> getMultiValueTypes()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.