org.eclipse.microprofile.rest.client.spi

## Class RestClientBuilderResolver

- java.lang.Object
- - org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver

    public abstract class RestClientBuilderResolver
    extends Object

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.

Author:
  Ondrej Mihalyi, John D. Ament

### Constructor Summary

Constructors
`protected` `RestClientBuilderResolver()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`static RestClientBuilderResolver` `instance()` Gets or creates a RestClientBuilderResolver instance.
`abstract RestClientBuilder` `newBuilder()` Creates a new RestClientBuilder instance.
`static void` `setInstance(RestClientBuilderResolver resolver)` Set the instance.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RestClientBuilderResolver

    protected RestClientBuilderResolver()

### Method Detail

#### newBuilder

    public abstract RestClientBuilder newBuilder()

Creates a new RestClientBuilder instance.

Implementations are expected to override the `newBuilder()` method to create custom RestClientBuilder implementations.

Returns:
  new RestClientBuilder instance

#### instance

    public static RestClientBuilderResolver instance()

Gets or creates a RestClientBuilderResolver instance. Only used internally from within `RestClientBuilder`

Returns:
  an instance of RestClientBuilderResolver

#### setInstance

    public static void setInstance(RestClientBuilderResolver resolver)

Set the instance. It can be as an alternative to service loader pattern, e.g. in OSGi environment

Parameters:
  `resolver` - instance.