public static interface RSocketGraphQlClient.Builder<B extends RSocketGraphQlClient.Builder<B>> extends GraphQlClient.Builder<B>
Modifier and Type | Method and Description |
---|---|
RSocketGraphQlClient |
build()
Build the
RSocketGraphQlClient instance. |
B |
clientTransport(io.rsocket.transport.ClientTransport clientTransport)
Use a given
ClientTransport to communicate with the remote
server. |
B |
clientTransports(org.reactivestreams.Publisher<List<io.rsocket.loadbalance.LoadbalanceTarget>> targetPublisher,
io.rsocket.loadbalance.LoadbalanceStrategy loadbalanceStrategy)
Use a
Publisher of LoadbalanceTarget s, each of which
contains a ClientTransport . |
B |
dataMimeType(MimeType dataMimeType)
Customize the format of data payloads for the connection.
|
B |
route(String route)
Customize the route to specify in the metadata of each request so the
server can route it to the handler for GraphQL requests.
|
B |
rsocketRequester(Consumer<RSocketRequester.Builder> requester)
Customize the underlying
RSocketRequester to use. |
B |
tcp(String host,
int port)
Select TCP as the underlying network protocol.
|
B |
webSocket(URI uri)
Select WebSocket as the underlying network protocol.
|
documentSource, interceptor, interceptors
B tcp(String host, int port)
RSocketRequester.Builder#tcp(String, int)
to create the
RSocketRequester
instance.host
- the remote host to connect toport
- the remote port to connect toB webSocket(URI uri)
RSocketRequester.Builder#websocket(URI)
to create the
RSocketRequester
instance.uri
- the URL for the WebSocket handshakeB clientTransport(io.rsocket.transport.ClientTransport clientTransport)
ClientTransport
to communicate with the remote
server. This delegates to
RSocketRequester.Builder#transport(ClientTransport)
to create
the RSocketRequester
instance.clientTransport
- the transport to useB clientTransports(org.reactivestreams.Publisher<List<io.rsocket.loadbalance.LoadbalanceTarget>> targetPublisher, io.rsocket.loadbalance.LoadbalanceStrategy loadbalanceStrategy)
Publisher
of LoadbalanceTarget
s, each of which
contains a ClientTransport
. This delegates to
RSocketRequester.Builder#transports(Publisher, LoadbalanceStrategy)
to create the RSocketRequester
instance.targetPublisher
- supplies list of targets to loadbalance against;
the targets are replaced when the given Publisher
emits again.loadbalanceStrategy
- the strategy to use for selecting from
the list of targets.B dataMimeType(MimeType dataMimeType)
By default, this is set to "application/graphql+json"
but
it can be changed to "application/json"
if necessary.
dataMimeType
- the mime type to useB route(String route)
route
- the routeB rsocketRequester(Consumer<RSocketRequester.Builder> requester)
RSocketRequester
to use.
Note that some properties of RSocketRequester.Builder
like the
data MimeType, and the underlying RSocket transport can be customized
through this builder.
dataMimeType(MimeType)
,
tcp(String, int)
,
webSocket(URI)
,
clientTransport(ClientTransport)
RSocketGraphQlClient build()
RSocketGraphQlClient
instance.build
in interface GraphQlClient.Builder<B extends RSocketGraphQlClient.Builder<B>>