Package org.glassfish.jersey.inject.hk2
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLoad a new injection manager with parent object.static boolean
Check HK2 Strategy propertyHK2_INJECTION_MANAGER_STRATEGY
and returnstrue
if the current HK2 Strategy is "immediate".Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.glassfish.jersey.internal.inject.InjectionManagerFactory
create
-
Field Details
-
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
Description copied from interface:InjectionManagerFactory
Load a new injection manager with parent object.- Specified by:
create
in interfaceInjectionManagerFactory
- 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 propertyHK2_INJECTION_MANAGER_STRATEGY
and returnstrue
if the current HK2 Strategy is "immediate".- Returns:
true
if the current HK2 Strategy is "immediate".
-