Class Hk2InjectionManagerFactory

All Implemented Interfaces:

@Priority(10) public class Hk2InjectionManagerFactory extends Object implements org.glassfish.jersey.internal.inject.InjectionManagerFactory
Factory which is able to create InjectionManager instance using service loading and automatically initialize injection manager using parent or immediately registers binder.
  • Field Details


      public static final String HK2_INJECTION_MANAGER_STRATEGY
      Hk2 Injection manager strategy.

      Value can be supplied only via java properties, which would typically be done using '-D' parameter, for example: java -Dorg.glassfish.jersey.hk2.injection.manager.strategy=delayed ...

      Valid values are "immediate" and "delayed" and values are case-insensitive.

      Default value is "immediate".

      See Also:
  • Constructor Details

    • Hk2InjectionManagerFactory

      public Hk2InjectionManagerFactory()
  • Method Details

    • create

      public org.glassfish.jersey.internal.inject.InjectionManager create(Object parent)
      Description copied from interface: org.glassfish.jersey.internal.inject.InjectionManagerFactory
      Load a new injection manager with parent object.
      Specified by:
      create in interface org.glassfish.jersey.internal.inject.InjectionManagerFactory
      parent - injection manager parent or concrete DI specific object which is compatible with DI provider.
      initialized injection manager.
    • isImmediateStrategy

      public static boolean isImmediateStrategy()
      Check HK2 Strategy property HK2_INJECTION_MANAGER_STRATEGY and returns true if the current HK2 Strategy is "immediate".
      true if the current HK2 Strategy is "immediate".