Class RestApi.Builder<B extends RestApi.Builder<B,T>,T extends RestApi>
- java.lang.Object
- 
- io.helidon.integrations.common.rest.RestApi.Builder<B,T>
 
- 
- Type Parameters:
- B- type of the builder (a subclass of this class)
- T- type of the built- RestApi
 - Direct Known Subclasses:
- OciRestApi.Builder,- VaultRestApi.BuilderBase
 - Enclosing interface:
- RestApi
 
 public abstract static class RestApi.Builder<B extends RestApi.Builder<B,T>,T extends RestApi> extends Object implements Builder<T> Base builder for REST APIs.
- 
- 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tbuild()Bconfig(Config config)Configure this builder from config.protected abstract TdoBuild()Build an instance ofRestApiimplementation.BfaultTolerance(FtHandler ftHandler)Configure the fault tolerance handler to use with client requests.protected FtHandlerftHandler()Configured Fault tolerance handler.Tget()protected JsonBuilderFactoryjsonBuilderFactory()JSON builder factory.protected JsonReaderFactoryjsonReaderFactory()JSON reader factory.protected JsonWriterFactoryjsonWriterFactory()JSON writer factory.protected Bme()Allows returning the correct type when subclassing.protected voidpostBuild()Post build method.protected voidpreBuild()Pre build method.protected WebClientwebClient()WebClient instance, available afterpostBuild()is called.BwebClientBuilder(Consumer<WebClient.Builder> updater)Update web client builder.
 
- 
- 
- 
Method Detail- 
buildpublic final T build() 
 - 
getpublic final T get() 
 - 
configpublic B config(Config config) Configure this builder from config. Useswebclientkey to configure theWebClientbuilder, andjsonpkey to configure the JSON factories.- Parameters:
- config- configuration on the node of this rest API
- Returns:
- updated builder
 
 - 
faultTolerancepublic B faultTolerance(FtHandler ftHandler) Configure the fault tolerance handler to use with client requests.- Parameters:
- ftHandler- fault tolerance handler
- Returns:
- updated builder
 
 - 
webClientBuilderpublic B webClientBuilder(Consumer<WebClient.Builder> updater) Update web client builder. This can be used to configureWebClient.Builder.connectTimeout(long, java.util.concurrent.TimeUnit),WebClient.Builder.readTimeout(long, java.util.concurrent.TimeUnit)and other options.- Parameters:
- updater- consumer that updates the web client builder
- Returns:
- updated builder instance
 
 - 
meprotected B me() Allows returning the correct type when subclassing.- Returns:
- this instance typed as subclass
 
 - 
preBuildprotected void preBuild() Pre build method. This implementation builds the web client and sets up JSON factories.
 - 
postBuildprotected void postBuild() Post build method. This implementation does nothing
 - 
doBuildprotected abstract T doBuild() Build an instance ofRestApiimplementation.- Returns:
- a new instance
 
 - 
webClientprotected WebClient webClient() WebClient instance, available afterpostBuild()is called.- Returns:
- web client
 
 - 
ftHandlerprotected FtHandler ftHandler() Configured Fault tolerance handler.- Returns:
- handler
 
 - 
jsonBuilderFactoryprotected JsonBuilderFactory jsonBuilderFactory() JSON builder factory.- Returns:
- builder factory
 
 - 
jsonReaderFactoryprotected JsonReaderFactory jsonReaderFactory() JSON reader factory.- Returns:
- reader factory
 
 - 
jsonWriterFactoryprotected JsonWriterFactory jsonWriterFactory() JSON writer factory.- Returns:
- writer factory
 
 
- 
 
-