Class GenericInjectionManagerStore
- java.lang.Object
-
- org.glassfish.jersey.ext.cdi1x.internal.GenericInjectionManagerStore
-
- All Implemented Interfaces:
InjectionManagerStore,InjectionTargetListener
public abstract class GenericInjectionManagerStore extends Object implements InjectionManagerStore, InjectionTargetListener
Genericinjection manager storethat allows multiple injection managers to run in parallel.lookupInjectionManager()method must be implemented that shall be utilized at runtime in the case that more than a single injection manager has been registered.- Since:
- 2.20
- Author:
- Jakub Podlesak
-
-
Constructor Summary
Constructors Constructor Description GenericInjectionManagerStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InjectionManagergetEffectiveInjectionManager()Obtain the effectiveinjection manager.abstract InjectionManagerlookupInjectionManager()CDI container specific method to obtain the actual injection manager belonging to the Jersey application where the current HTTP requests is being processed.voidnotify(InjectionManagerInjectedTarget target)Notify the HK2 locator manager about new injection target being processed.voidregisterInjectionManager(InjectionManager injectionManager)Register a newinjection managerwith this manager.
-
-
-
Method Detail
-
registerInjectionManager
public void registerInjectionManager(InjectionManager injectionManager)
Description copied from interface:InjectionManagerStoreRegister a newinjection managerwith this manager.- Specified by:
registerInjectionManagerin interfaceInjectionManagerStore- Parameters:
injectionManager- injection manager to be registered.
-
getEffectiveInjectionManager
public InjectionManager getEffectiveInjectionManager()
Description copied from interface:InjectionManagerStoreObtain the effectiveinjection manager. The implementations are supposed to decide which of the registered injection managers is the currently effective locator. The decision can be based, for example, on current Servlet context (if the application is deployed on Servlet container).- Specified by:
getEffectiveInjectionManagerin interfaceInjectionManagerStore- Returns:
- currently effective injection manager.
-
lookupInjectionManager
public abstract InjectionManager lookupInjectionManager()
CDI container specific method to obtain the actual injection manager belonging to the Jersey application where the current HTTP requests is being processed.- Returns:
- actual injection manager.
-
notify
public void notify(InjectionManagerInjectedTarget target)
Description copied from interface:InjectionTargetListenerNotify the HK2 locator manager about new injection target being processed.- Specified by:
notifyin interfaceInjectionTargetListener- Parameters:
target- processed injection target.
-
-