Class Hk2InjectionManagerFactory

java.lang.Object
org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory
All Implemented Interfaces:
InjectionManagerFactory

@Priority(10) public class Hk2InjectionManagerFactory extends Object implements 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

    • HK2_INJECTION_MANAGER_STRATEGY

      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 InjectionManager create(Object parent)
      Description copied from interface: InjectionManagerFactory
      Load a new injection manager with parent object.
      Specified by:
      create in interface InjectionManagerFactory
      Parameters:
      parent - injection manager parent or concrete DI specific object which is compatible with DI provider.
      Returns:
      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".
      Returns:
      true if the current HK2 Strategy is "immediate".