Class RestClientBuilderResolver
java.lang.Object
org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver
Resolver for a
RestClientBuilder
implementation. A resolver should extend this class and and be registered
via the ServiceLoader
mechanism or via setInstance(RestClientBuilderResolver resolver)
.
This class is not intended to be used by end-users but for portable integration purpose only to provide
implementation of RestClientBuilder
instances.
Implementations have to provide the newBuilder()
method to create custom RestClientBuilder
implementations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RestClientBuilderResolver
instance()
Gets or creates a RestClientBuilderResolver instance.abstract RestClientBuilder
Creates a new RestClientBuilder instance.static void
setInstance
(RestClientBuilderResolver resolver) Set the instance.
-
Constructor Details
-
RestClientBuilderResolver
protected RestClientBuilderResolver()
-
-
Method Details
-
newBuilder
Creates a new RestClientBuilder instance.Implementations are expected to override the
newBuilder()
method to create custom RestClientBuilder implementations.- Returns:
- new RestClientBuilder instance
-
instance
Gets or creates a RestClientBuilderResolver instance. Only used internally from withinRestClientBuilder
- Returns:
- an instance of RestClientBuilderResolver
-
setInstance
Set the instance. It can be as an alternative to service loader pattern, e.g. in OSGi environment- Parameters:
resolver
- instance.
-