Interface RestClientBuilderListener

  • public interface RestClientBuilderListener
    Implementations of this interface will be notified when new RestClientBuilder instances are being constructed. This will allow implementations to register providers on the RestClientBuilder, and is intended for global providers. For example, a MicroProfile OpenTracing implementation might want to register a ClientRequestFilter to initiate tracing. In order for the RestClientBuilder to call implementations of this interface, the implementation must be specified such that a ServiceLoader can find it - i.e. it must be specified in the META-INF/services/ file in an archive on the current thread's context classloader's class path. Note that the onNewBuilder method will be called when the RestClientBuilder is constructed, not when it's build method is invoked. This allows the caller to override global providers if they desire.