RSocket with a fluent API accepting
and returning higher level Objects for input and for output, along with
methods to prepare routing and other metadata.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | RSocketRequester.
Builder to create a requester by connecting to a server. |
| public static interface | RSocketRequester.
a self reference to the spec type S extends RSocketRequester.Spec for providing additional composite metadata entries. |
| public static interface | RSocketRequester.
Spec to declare the input for an RSocket request. |
| public static interface | RSocketRequester.
Spec to declare the expected output for an RSocket request. |
| Modifier and Type | Method and Description |
|---|---|
| public static RSocketRequester. | |
| public MimeType | |
| public default void | dispose()
Implements reactor. Shortcut method that delegates to the same on the underlying
|
| public default boolean | isDisposed()
Overrides default reactor. Shortcut method that delegates to the same on the underlying
|
| public RSocketRequester. | metadata(Object
the metadata value to encode metadata, MimeType the mime type that describes the metadata;
This is required for connection using composite metadata. Otherwise, the
value is encoded according to the mime type for the connection and this
argument may be left as mimeType)null.Begin to specify a new request with the given metadata value, which can
be a concrete value or any producer of a single value that can be adapted
to a |
| public MimeType | metadataMimeType()
Return the metadata |
| public RSocketRequester. | |
| public RSocket | rsocket()
Return the underlying |
| public RSocketClient | |
| public RSocketStrategies | |
| public static RSocketRequester |
| builder | back to summary |
|---|---|
| public static RSocketRequester. Obtain a builder to create a client | |
| dataMimeType | back to summary |
|---|---|
| public MimeType dataMimeType() Return the data | |
| dispose | back to summary |
|---|---|
| public default void dispose() Implements reactor. Shortcut method that delegates to the same on the underlying
| |
| isDisposed | back to summary |
|---|---|
| public default boolean isDisposed() Overrides default reactor. Shortcut method that delegates to the same on the underlying
| |
| metadata | back to summary |
|---|---|
| public RSocketRequester. Begin to specify a new request with the given metadata value, which can
be a concrete value or any producer of a single value that can be adapted
to a | |
| metadataMimeType | back to summary |
|---|---|
| public MimeType metadataMimeType() Return the metadata | |
| route | back to summary |
|---|---|
| public RSocketRequester. Begin to specify a new request with the given route to a remote handler. The route can be a template with placeholders, e.g.
If the connection is set to use composite metadata, the route is
encoded as
| |
| rsocket | back to summary |
|---|---|
| public RSocket rsocket() Return the underlying
| |
| rsocketClient | back to summary |
|---|---|
| public RSocketClient rsocketClient() Return the underlying
| |
| strategies | back to summary |
|---|---|
| public RSocketStrategies strategies() Return the configured | |
| wrap | back to summary |
|---|---|
| public static RSocketRequester wrap(RSocket rsocket, MimeType dataMimeType, MimeType metadataMimeType, RSocketStrategies strategies) Wrap an existing | |
| Modifier and Type | Method and Description |
|---|---|
| public RSocketRequester. | apply(Consumer<RSocketRequester.
the configurer to apply configurerConfigure this builder through a |
| public Mono | Returns: anRSocketRequester for the connectionthe client transport to use transport)
Deprecated
as of 5.3 in favor of
transport(ClientTransport)
Connect to the server with the given |
| public Mono | Returns: anRSocketRequester for the connectionthe server host host, int the server port port)
Deprecated
as of 5.3 in favor of
tcp(String, int)
Connect to the server over TCP. |
| public Mono | Returns: anRSocketRequester for the connectionthe RSocket server endpoint URI uri)
Deprecated
as of 5.3 in favor of
websocket(URI)
Connect to the server over WebSocket. |
| public RSocketRequester. | dataMimeType(MimeType mimeType)
Configure the payload data MimeType to specify on the |
| public RSocketRequester. | metadataMimeType(MimeType mimeType)
Configure the payload metadata MimeType to specify on the |
| public RSocketRequester. | rsocketConnector(RSocketConnectorConfigurer configurer)
Callback to configure the |
| public RSocketRequester. | rsocketStrategies(RSocketStrategies
the strategies to use strategies)Provide the |
| public RSocketRequester. | |
| public RSocketRequester. | |
| public RSocketRequester. | |
| public RSocketRequester. | |
| public RSocketRequester | Returns: the createdRSocketRequesterthe host to connect to host, int the port to connect to port)Build an |
| public RSocketRequester | Returns: the createdRSocketRequesterthe transport to connect with transport)Variant of |
| public RSocketRequester | Returns: the createdRSocketRequestera targetPublisher, LoadbalanceStrategy Publisher that supplies a list of
target transports to loadbalance against; the given list may be
periodically updated by the Publisher.the strategy to use for selecting from
the list of loadbalance targets. loadbalanceStrategy)Build an |
| public RSocketRequester | Returns: the createdRSocketRequesterthe URL to connect to uri)Build an |
| apply | back to summary |
|---|---|
| public RSocketRequester. Configure this builder through a
| |
| connect | back to summary |
|---|---|
| public Mono Deprecated as of 5.3 in favor of Connect to the server with the given
| |
| connectTcp | back to summary |
|---|---|
| public Mono Deprecated as of 5.3 in favor of Connect to the server over TCP.
| |
| connectWebSocket | back to summary |
|---|---|
| public Mono Deprecated as of 5.3 in favor of Connect to the server over WebSocket.
| |
| dataMimeType | back to summary |
|---|---|
| public RSocketRequester. Configure the payload data MimeType to specify on the If not set, this will be initialized to the MimeType of the first
| |
| metadataMimeType | back to summary |
|---|---|
| public RSocketRequester. Configure the payload metadata MimeType to specify on the By default this is set to
| |
| rsocketConnector | back to summary |
|---|---|
| public RSocketRequester. Callback to configure the
| |
| rsocketStrategies | back to summary |
|---|---|
| public RSocketRequester. Provide the This is useful for changing the default settings, yet still allowing
further customizations via
| |
| rsocketStrategies | back to summary |
|---|---|
| public RSocketRequester. Customize the Allows further customization on | |
| setupData | back to summary |
|---|---|
| public RSocketRequester. Set the data for the setup payload. The data will be encoded
according to the configured By default this is not set. | |
| setupMetadata | back to summary |
|---|---|
| public RSocketRequester. Add metadata entry to the setup payload. Composite metadata must be
in use if this is called more than once or in addition to
| |
| setupRoute | back to summary |
|---|---|
| public RSocketRequester. Set the route for the setup payload. The rules for formatting and
encoding the route are the same as those for a request route as
described in By default this is not set. | |
| tcp | back to summary |
|---|---|
| public RSocketRequester tcp(String host, int port) Build an
| |
| transport | back to summary |
|---|---|
| public RSocketRequester transport(ClientTransport transport) Variant of
| |
| transports | back to summary |
|---|---|
| public RSocketRequester transports(Publisher<List<LoadbalanceTarget>> targetPublisher, LoadbalanceStrategy loadbalanceStrategy) Build an
| |
| websocket | back to summary |
|---|---|
| public RSocketRequester websocket(URI uri) Build an
| |
| Modifier and Type | Method and Description |
|---|---|
| public S | metadata(Object
an Object to be encoded with a suitable
metadata, MimeType Encoder, or a
DataBufferthe mime type that describes the metadata mimeType)Use this to append additional metadata entries when using composite metadata. |
| metadata | back to summary |
|---|---|
| public S metadata(Object metadata, MimeType mimeType) Use this to append additional metadata entries when using composite
metadata. An
| |
| Modifier and Type | Method and Description |
|---|---|
| public RSocketRequester. | |
| public RSocketRequester. | Returns: spec to declare the expected responsethe source of payload data value(s). This must be a
producer, Class<?> Publisher or another producer adaptable to a
Publisher via ReactiveAdapterRegistrythe type of values to be produced elementClass)Variant of |
| public RSocketRequester. | Returns: spec to declare the expected responsethe source of payload data value(s). This must be a
producer, ParameterizedTypeReference<?> Publisher or another producer adaptable to a
Publisher via ReactiveAdapterRegistrythe type of values to be produced elementTypeRef)Variant of |
| public RSocketRequester. | metadata(Consumer<RSocketRequester.
the configurer to apply configurerAppend additional metadata entries through a |
| public Mono |
| data | back to summary |
|---|---|
| public RSocketRequester. Provide payload data for the request. This can be one of:
| |
| data | back to summary |
|---|---|
| public RSocketRequester. Variant of
| |
| data | back to summary |
|---|---|
| public RSocketRequester. Variant of
| |
| metadata | back to summary |
|---|---|
| public RSocketRequester. Append additional metadata entries through a
| |
| sendMetadata | back to summary |
|---|---|
| public Mono Perform a
| |
| Modifier and Type | Method and Description |
|---|---|
| public < parameterize the expected type of values T> Flux | Returns: the decoded responsethe expected type for values in the response dataType)Perform an |
| public <T> Flux | retrieveFlux(ParameterizedTypeReference<T> dataTypeRef)
Variant of |
| public < parameter for the expected data type T> Mono | Returns: the decoded responsethe expected data type for the response dataType)Perform a |
| public <T> Mono | retrieveMono(ParameterizedTypeReference<T> dataTypeRef)
Variant of |
| public Mono | Returns: a completion that indicates if the payload was sent successfully or not. Note, however that is a one-way send and there is no indication of whether or how the even was handled on the remote end.Perform a |
| retrieveFlux | back to summary |
|---|---|
| public <T> Flux Perform an If the return type is | |
| retrieveFlux | back to summary |
|---|---|
| public <T> Flux Variant of | |
| retrieveMono | back to summary |
|---|---|
| public <T> Mono Perform a If the return type is Note This method will raise an error if
the request payload is a multivalued | |
| retrieveMono | back to summary |
|---|---|
| public <T> Mono Variant of | |
| send | back to summary |
|---|---|
| public Mono Perform a | |