Interface RSocketGraphQlClient.Builder<B extends RSocketGraphQlClient.Builder<B>>
- Type Parameters:
- B- the builder type
- All Superinterfaces:
- GraphQlClient.BaseBuilder<B>,- GraphQlClient.Builder<B>
- Enclosing interface:
- RSocketGraphQlClient
public static interface RSocketGraphQlClient.Builder<B extends RSocketGraphQlClient.Builder<B>>
extends GraphQlClient.Builder<B>
Builder for the GraphQL over HTTP client.
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build theRSocketGraphQlClientinstance.clientTransport(io.rsocket.transport.ClientTransport clientTransport) Use a givenClientTransportto communicate with the remote server.clientTransports(org.reactivestreams.Publisher<List<io.rsocket.loadbalance.LoadbalanceTarget>> targetPublisher, io.rsocket.loadbalance.LoadbalanceStrategy loadbalanceStrategy) Use aPublisherofLoadbalanceTargets, each of which contains aClientTransport.dataMimeType(MimeType dataMimeType) Customize the format of data payloads for the connection.Customize the route to specify in the metadata of each request so the server can route it to the handler for GraphQL requests.rsocketRequester(Consumer<RSocketRequester.Builder> requester) Customize the underlyingRSocketRequesterto use.Select TCP as the underlying network protocol.Select WebSocket as the underlying network protocol.Methods inherited from interface org.springframework.graphql.client.GraphQlClient.BaseBuilderblockingTimeout, documentSourceMethods inherited from interface org.springframework.graphql.client.GraphQlClient.Builderinterceptor, interceptors
- 
Method Details- 
tcpSelect TCP as the underlying network protocol. This delegates toRSocketRequester.Builder.tcp(String, int)to create theRSocketRequesterinstance.- Parameters:
- host- the remote host to connect to
- port- the remote port to connect to
- Returns:
- the same builder instance
 
- 
webSocketSelect WebSocket as the underlying network protocol. This delegates toRSocketRequester.Builder.websocket(URI)to create theRSocketRequesterinstance.- Parameters:
- uri- the URL for the WebSocket handshake
- Returns:
- the same builder instance
 
- 
clientTransportUse a givenClientTransportto communicate with the remote server. This delegates toRSocketRequester.Builder.transport(ClientTransport)to create theRSocketRequesterinstance.- Parameters:
- clientTransport- the transport to use
- Returns:
- the same builder instance
 
- 
clientTransportsB clientTransports(org.reactivestreams.Publisher<List<io.rsocket.loadbalance.LoadbalanceTarget>> targetPublisher, io.rsocket.loadbalance.LoadbalanceStrategy loadbalanceStrategy) Use aPublisherofLoadbalanceTargets, each of which contains aClientTransport. This delegates toRSocketRequester.Builder.transports(Publisher, LoadbalanceStrategy)to create theRSocketRequesterinstance.- Parameters:
- targetPublisher- supplies list of targets to loadbalance against; the targets are replaced when the given- Publisheremits again.
- loadbalanceStrategy- the strategy to use for selecting from the list of targets.
- Returns:
- the same builder instance
- Since:
- 1.0.3
 
- 
dataMimeType
- 
route
- 
rsocketRequesterCustomize the underlyingRSocketRequesterto use.Note that some properties of RSocketRequester.Builderlike the data MimeType, and the underlying RSocket transport can be customized through this builder.- Parameters:
- requester- the requester to be customized
- Returns:
- the same builder instance
- See Also:
 
- 
buildRSocketGraphQlClient build()Build theRSocketGraphQlClientinstance.- Specified by:
- buildin interface- GraphQlClient.BaseBuilder<B extends RSocketGraphQlClient.Builder<B>>
 
 
-