Class InjectionManagerClientProvider

java.lang.Object
org.glassfish.jersey.InjectionManagerProvider
org.glassfish.jersey.client.InjectionManagerClientProvider

public class InjectionManagerClientProvider extends InjectionManagerProvider
Extension of InjectionManagerProvider which contains helper static methods that extract InjectionManager from client specific JAX-RS components.

See javadoc of InjectionManagerProvider for more details.

Since:
2.6
See Also:
  • Constructor Details

    • InjectionManagerClientProvider

      public InjectionManagerClientProvider()
  • Method Details

    • getInjectionManager

      public static InjectionManager getInjectionManager(javax.ws.rs.client.ClientRequestContext clientRequestContext)
      Extract and return injection manager from clientRequestContext. The method can be used to inject custom types into a ClientRequestFilter.
      Parameters:
      clientRequestContext - Client request context.
      Returns:
      injection manager.
      Throws:
      IllegalArgumentException - when clientRequestContext is not a default Jersey implementation provided by Jersey as argument in the ClientRequestFilter.filter(javax.ws.rs.client.ClientRequestContext) method.
    • getInjectionManager

      public static InjectionManager getInjectionManager(javax.ws.rs.client.ClientResponseContext clientResponseContext)
      Extract and return injection manager from clientResponseContext. The method can be used to inject custom types into a ClientResponseFilter.
      Parameters:
      clientResponseContext - Client response context.
      Returns:
      injection manager.
      Throws:
      IllegalArgumentException - when clientResponseContext is not a default Jersey implementation provided by Jersey as argument in the ClientResponseFilter.filter(javax.ws.rs.client.ClientRequestContext, javax.ws.rs.client.ClientResponseContext) method.