Top Description Methods
io.rsocket

public Interface RSocket

extends Availability, Closeable
Known Direct Implementers
io.rsocket.core.RSocketRequester, io.rsocket.core.RSocketResponder, io.rsocket.loadbalance.PooledRSocket, io.rsocket.loadbalance.RSocketPool.DeferredResolutionRSocket, io.rsocket.util.RSocketProxy
Imports
org.reactivestreams.Publisher, reactor.core.publisher.Flux, .Mono

A contract providing different interaction models for RSocket protocol.

Method Summary

Modifier and TypeMethod and Description
public default double
public default void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
public default Mono<Void>

Returns:

Publisher that completes when the passed payload is successfully handled, otherwise errors.
fireAndForget
(Payload
Request payload.
payload
)

Fire and Forget interaction model of RSocket.

public default boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public default Mono<Void>

Returns:

Publisher that completes when the passed payload is successfully handled, otherwise errors.
metadataPush
(Payload
Request payloads.
payload
)

Metadata-Push interaction model of RSocket.

public default Mono<Void>
onClose()

Implements io.rsocket.Closeable.onClose.

Returns a Mono that terminates when the instance is terminated by any reason.
public default Flux<Payload>

Returns:

Stream of response payloads.
requestChannel
(Publisher<Payload>
Stream of request payloads.
payloads
)

Request-Channel interaction model of RSocket.

public default Mono<Payload>

Returns:

Publisher containing at most a single Payload representing the response.
requestResponse
(Payload
Request payload.
payload
)

Request-Response interaction model of RSocket.

public default Flux<Payload>

Returns:

Publisher containing the stream of Payloads representing the response.
requestStream
(Payload
Request payload.
payload
)

Request-Stream interaction model of RSocket.

Method Detail

availabilityback to summary
public default double availability()

Implements io.rsocket.Availability.availability.

Returns:double

Doc from io.rsocket.Availability.availability.

a positive numbers representing the availability of the entity. Higher is better, 0.0 means not available

Annotations
@Override
disposeback to summary
public default void dispose()

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
fireAndForgetback to summary
public default Mono<Void> fireAndForget(Payload payload)

Fire and Forget interaction model of RSocket.

Parameters
payload:Payload

Request payload.

Returns:Mono<Void>

Publisher that completes when the passed payload is successfully handled, otherwise errors.

isDisposedback to summary
public default boolean isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
metadataPushback to summary
public default Mono<Void> metadataPush(Payload payload)

Metadata-Push interaction model of RSocket.

Parameters
payload:Payload

Request payloads.

Returns:Mono<Void>

Publisher that completes when the passed payload is successfully handled, otherwise errors.

onCloseback to summary
public default Mono<Void> onClose()

Implements io.rsocket.Closeable.onClose.

Doc from io.rsocket.Closeable.onClose.

Returns a Mono that terminates when the instance is terminated by any reason. Note, in case of error termination, the cause of error will be propagated as an error signal through org.reactivestreams.Subscriber#onError(Throwable). Otherwise, Subscriber#onComplete() will be called.

Returns:Mono<Void>

a Mono to track completion with success or error of the underlying resource. When the underlying resource is an `RSocket`, the Mono exposes stream 0 (i.e. connection level) errors.

Annotations
@Override
requestChannelback to summary
public default Flux<Payload> requestChannel(Publisher<Payload> payloads)

Request-Channel interaction model of RSocket.

Parameters
payloads:Publisher<Payload>

Stream of request payloads.

Returns:Flux<Payload>

Stream of response payloads.

requestResponseback to summary
public default Mono<Payload> requestResponse(Payload payload)

Request-Response interaction model of RSocket.

Parameters
payload:Payload

Request payload.

Returns:Mono<Payload>

Publisher containing at most a single Payload representing the response.

requestStreamback to summary
public default Flux<Payload> requestStream(Payload payload)

Request-Stream interaction model of RSocket.

Parameters
payload:Payload

Request payload.

Returns:Flux<Payload>

Publisher containing the stream of Payloads representing the response.