Package org.glassfish.jersey.client.spi
Interface InvocationBuilderListener
-
@Beta @Contract @ConstrainedTo(CLIENT) public interface InvocationBuilderListener
Implementations of this interface will be notified when a new Invocation.Builder is created. This will allow implementations to access the invocation builders, and is intended for global providers. For example, the Invocation.Builder properties can be accessed to set properties that are available on theClientRequestContext.In order for the InvocationBuilderListener to be called, the implementation of the interface needs to be registered on the
Clientthe same way theClientRequestFilteris registered, for instance. If multipleInvocationBuilderListenersare to be utilized, the order of execution is driven by thePriority, the lower the priority value, the higher the priority, the sooner the execution.- Since:
- 2.30
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceInvocationBuilderListener.InvocationBuilderContextAnInvocation.Buildersubset of setter methods.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonNewBuilder(InvocationBuilderListener.InvocationBuilderContext context)Whenever anInvocation.Builderis created, (i.e.
-
-
-
Method Detail
-
onNewBuilder
void onNewBuilder(InvocationBuilderListener.InvocationBuilderContext context)
Whenever anInvocation.Builderis created, (i.e. whenWebTarget.request(),WebTarget.request(String...),WebTarget.request(MediaType...)is called), this method would be invoked.- Parameters:
context- the updatedInvocationBuilderListener.InvocationBuilderContext.
-
-