Class AbstractGraphQlClientBuilder<B extends AbstractGraphQlClientBuilder<B>>
- Type Parameters:
- B- the type of builder
- All Implemented Interfaces:
- GraphQlClient.BaseBuilder<B>,- GraphQlClient.Builder<B>
GraphQlClient.Builder
 implementations.
 Subclasses must implement GraphQlClient.BaseBuilder.build() and call
 buildGraphQlClient(GraphQlTransport) to obtain a default, transport
 agnostic GraphQlClient. A transport specific extension can then wrap
 this default tester by extending AbstractDelegatingGraphQlClient.
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static class
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDefault constructor for use from subclasses.
- 
Method SummaryModifier and TypeMethodDescriptionblockingTimeout(Duration blockingTimeout) Configure a timeout to use for blocking execution.protected GraphQlClientbuildGraphQlClient(GraphQlTransport transport) Build the default transport-agnostic client that subclasses can then wrap withAbstractDelegatingGraphQlClient.documentSource(DocumentSource documentSource) Configure aDocumentSourcestrategy to resolve a document by name.protected Consumer<AbstractGraphQlClientBuilder<?>>Return aConsumerto initialize new builders from "this" builder.protected List<GraphQlClientInterceptor>Return the configured interceptors.protected Decoder<?>Access to the configured JSON encoder.protected Encoder<?>Access to the configured JSON encoder.interceptor(GraphQlClientInterceptor... interceptors) Configure interceptors to be invoked before delegating to theGraphQlTransportto perform the request.interceptors(Consumer<List<GraphQlClientInterceptor>> interceptorsConsumer) Customize the list of interceptors.protected voidsetJsonCodecs(Encoder<?> encoder, Decoder<?> decoder) Transport-specific subclasses can provide their JSONEncoderandDecoderfor use at the client level, for mapping response data to some target entity type.protected voidsetJsonDecoder(Decoder<?> decoder) Variant ofsetJsonCodecs(org.springframework.core.codec.Encoder<?>, org.springframework.core.codec.Decoder<?>)for setting each codec individually.protected voidsetJsonEncoder(Encoder<?> encoder) Variant ofsetJsonCodecs(org.springframework.core.codec.Encoder<?>, org.springframework.core.codec.Decoder<?>)for setting each codec individually.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.graphql.client.GraphQlClient.BaseBuilderbuild
- 
Field Details- 
jackson2Presentprotected static final boolean jackson2Present
 
- 
- 
Constructor Details- 
AbstractGraphQlClientBuilderprotected AbstractGraphQlClientBuilder()Default constructor for use from subclasses.Subclasses must set the transport to use before GraphQlClient.BaseBuilder.build()or during, by overridingGraphQlClient.BaseBuilder.build().
 
- 
- 
Method Details- 
interceptorDescription copied from interface:GraphQlClient.BuilderConfigure interceptors to be invoked before delegating to theGraphQlTransportto perform the request.- Specified by:
- interceptorin interface- GraphQlClient.Builder<B extends AbstractGraphQlClientBuilder<B>>
- Parameters:
- interceptors- the interceptors to add
- Returns:
- this builder
 
- 
interceptorsDescription copied from interface:GraphQlClient.BuilderCustomize the list of interceptors. The provided list is "live", so the consumer can inspect and insert interceptors accordingly.- Specified by:
- interceptorsin interface- GraphQlClient.Builder<B extends AbstractGraphQlClientBuilder<B>>
- Parameters:
- interceptorsConsumer- consumer to customize the interceptors with
- Returns:
- this builder
 
- 
documentSourceDescription copied from interface:GraphQlClient.BaseBuilderConfigure aDocumentSourcestrategy to resolve a document by name. For use withinGraphQlClient.documentName(String).By default, this is set to ResourceDocumentSourcewith classpath location"graphql-documents/"andResourceDocumentSource.FILE_EXTENSIONSas extensions.- Specified by:
- documentSourcein interface- GraphQlClient.BaseBuilder<B extends AbstractGraphQlClientBuilder<B>>
- Parameters:
- documentSource- the strategy for resolving documents by their names
 
- 
blockingTimeoutDescription copied from interface:GraphQlClient.BaseBuilderConfigure a timeout to use for blocking execution.By default this is not set, in which case the behavior depends on connection and request timeout settings of the underlying transport. We recommend configuring timeout values directly if possible on the underlying transport library such an HTTP client library as that can provide more control over such settings. - Specified by:
- blockingTimeoutin interface- GraphQlClient.BaseBuilder<B extends AbstractGraphQlClientBuilder<B>>
- Parameters:
- blockingTimeout- the timeout to use
 
- 
setJsonCodecsTransport-specific subclasses can provide their JSONEncoderandDecoderfor use at the client level, for mapping response data to some target entity type.- Parameters:
- encoder- the JSON encoder
- decoder- the JSON decoder
 
- 
setJsonEncoderVariant ofsetJsonCodecs(org.springframework.core.codec.Encoder<?>, org.springframework.core.codec.Decoder<?>)for setting each codec individually.- Parameters:
- encoder- the JSON encoder
 
- 
getJsonEncoderAccess to the configured JSON encoder.
- 
setJsonDecoderVariant ofsetJsonCodecs(org.springframework.core.codec.Encoder<?>, org.springframework.core.codec.Decoder<?>)for setting each codec individually.- Parameters:
- decoder- the JSON decoder
 
- 
getJsonDecoderAccess to the configured JSON encoder.
- 
getInterceptorsReturn the configured interceptors. For subclasses that look for a transport specific interceptor extensions.
- 
buildGraphQlClientBuild the default transport-agnostic client that subclasses can then wrap withAbstractDelegatingGraphQlClient.- Parameters:
- transport- the GraphQL transport to be used by the client
 
- 
getBuilderInitializerReturn aConsumerto initialize new builders from "this" builder.
 
-