Package 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
Modifier
Constructor
Description
`protected`
`RestClientBuilderResolver()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### RestClientBuilderResolver

protected RestClientBuilderResolver()

## Method Details

### 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.