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.

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