Interface RSocketStrategies
public interface RSocketStrategies
Access to strategies for use by RSocket requester and responder components.- Since:
- 5.2
- Author:
- Rossen Stoyanchev
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RSocketStrategies.Builder
The builder options for creatingRSocketStrategies
.
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static RSocketStrategies.Builder
builder()
Return a builder to prepare a newRSocketStrategies
instance.static RSocketStrategies
create()
Create anRSocketStrategies
instance with default settings.DataBufferFactory
dataBufferFactory()
Return the configureddataBufferFactory
.default <T> Decoder<T>
decoder(ResolvableType elementType, MimeType mimeType)
Find a compatible Decoder for the given element type.List<Decoder<?>>
decoders()
Return the configureddecoders
.default <T> Encoder<T>
encoder(ResolvableType elementType, MimeType mimeType)
Find a compatible Encoder for the given element type.List<Encoder<?>>
encoders()
Return the configuredencoders
.MetadataExtractor
metadataExtractor()
Return the configuredRSocketStrategies.Builder.metadataExtractor(MetadataExtractor)
.default RSocketStrategies.Builder
mutate()
Return a builder to create a newRSocketStrategies
instance replicated from the current instance.ReactiveAdapterRegistry
reactiveAdapterRegistry()
Return the configuredreactiveAdapterRegistry
.RouteMatcher
routeMatcher()
Return the configuredRSocketStrategies.Builder.routeMatcher(RouteMatcher)
.
Method Detail
encoders
List<Encoder<?>> encoders()
Return the configuredencoders
.- See Also:
encoder(ResolvableType, MimeType)
encoder
default <T> Encoder<T> encoder(ResolvableType elementType, @Nullable MimeType mimeType)
Find a compatible Encoder for the given element type.- Type Parameters:
T
- for casting the Encoder to the expected element type- Parameters:
elementType
- the element type to matchmimeType
- the MimeType to match- Returns:
- the matching Encoder
- Throws:
IllegalArgumentException
- if no matching Encoder is found
decoders
List<Decoder<?>> decoders()
Return the configureddecoders
.- See Also:
decoder(ResolvableType, MimeType)
decoder
default <T> Decoder<T> decoder(ResolvableType elementType, @Nullable MimeType mimeType)
Find a compatible Decoder for the given element type.- Type Parameters:
T
- for casting the Decoder to the expected element type- Parameters:
elementType
- the element type to matchmimeType
- the MimeType to match- Returns:
- the matching Decoder
- Throws:
IllegalArgumentException
- if no matching Decoder is found
routeMatcher
RouteMatcher routeMatcher()
Return the configuredRSocketStrategies.Builder.routeMatcher(RouteMatcher)
.
reactiveAdapterRegistry
ReactiveAdapterRegistry reactiveAdapterRegistry()
Return the configuredreactiveAdapterRegistry
.
dataBufferFactory
DataBufferFactory dataBufferFactory()
Return the configureddataBufferFactory
.
metadataExtractor
MetadataExtractor metadataExtractor()
Return the configuredRSocketStrategies.Builder.metadataExtractor(MetadataExtractor)
.
mutate
default RSocketStrategies.Builder mutate()
Return a builder to create a newRSocketStrategies
instance replicated from the current instance.
create
static RSocketStrategies create()
Create anRSocketStrategies
instance with default settings. Equivalent toRSocketStrategies.builder().build()
. See individual builder methods for details on default settings.
builder
static RSocketStrategies.Builder builder()
Return a builder to prepare a newRSocketStrategies
instance. The builder applies default settings, see individual builder methods for details.