Package com.guinetik.rr
Class RocketRestConfig.Builder
- java.lang.Object
-
- com.guinetik.rr.RocketRestConfig.Builder
-
- Direct Known Subclasses:
RocketRestSecureConfig.SecureBuilder
- Enclosing class:
- RocketRestConfig
public static class RocketRestConfig.Builder extends Object
Builder for creating RocketRestConfig instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RocketRestConfig.BuilderauthStrategy(AuthStrategy authStrategy)Sets the authentication strategy.RocketRestConfigbuild()Builds a new RocketRestConfig instance.RocketRestConfig.BuilderdefaultOption(String key, Object value)Sets a specific default client option.RocketRestConfig.BuilderdefaultOptions(Consumer<RocketRestOptions> optionsConfigurer)Sets default client options that will be used by clients created with this config.RocketRestConfig.BuildertokenUrl(String tokenUrl)Sets the token URL for OAuth flows.
-
-
-
Constructor Detail
-
Builder
public Builder(String serviceUrl)
-
-
Method Detail
-
tokenUrl
public RocketRestConfig.Builder tokenUrl(String tokenUrl)
Sets the token URL for OAuth flows.- Parameters:
tokenUrl- the token URL- Returns:
- this builder instance
-
authStrategy
public RocketRestConfig.Builder authStrategy(AuthStrategy authStrategy)
Sets the authentication strategy.- Parameters:
authStrategy- the authentication strategy- Returns:
- this builder instance
-
defaultOptions
public RocketRestConfig.Builder defaultOptions(Consumer<RocketRestOptions> optionsConfigurer)
Sets default client options that will be used by clients created with this config.- Parameters:
optionsConfigurer- a consumer that configures the default options- Returns:
- this builder instance
-
defaultOption
public RocketRestConfig.Builder defaultOption(String key, Object value)
Sets a specific default client option.- Parameters:
key- the option keyvalue- the option value- Returns:
- this builder instance
-
build
public RocketRestConfig build()
Builds a new RocketRestConfig instance.- Returns:
- a new RocketRestConfig instance
-
-