@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
.
Modifier and Type | Method and Description |
---|---|
void |
onNewBuilder(ClientBuilder builder) |
void onNewBuilder(ClientBuilder builder)
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.