Interface ClientBuilderListener


@Beta public interface ClientBuilderListener

Implementations of this interface will be notified when new ClientBuilder instances are being constructed. This will allow implementations to register providers on the ClientBuilder, and is intended for global providers.

In order for the ClientBuilder 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/org.glassfish.jersey.client.spi.ClientBuilderListener file in an archive on the current thread's context classloader's class path.

Note that the onNewBuilder method will be called when the ClientBuilder is constructed, not when it's build method is invoked. This allows the caller to override global providers if they desire.

The ClientBuilderListener are invoked in an order given by it's @Priority. The default is Priorities.USER.

Since:
2.32
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
  • Method Details