Package org.glassfish.cdi.hk2
Class CDIContextBridge
- java.lang.Object
-
- org.glassfish.cdi.hk2.CDIContextBridge
-
- All Implemented Interfaces:
org.glassfish.hk2.api.Context<CDIScope>
@Singleton public class CDIContextBridge extends Object implements org.glassfish.hk2.api.Context<CDIScope>
This is an HK2 context for use with descriptors that are backed by CDI services (which are not Dependent or Singleton). This scope is most like PerLookup, as it always asks for a new instance. Whether or not CDI truly gives a new instance or not is up to CDI- Author:
- jwells
-
-
Constructor Summary
Constructors Constructor Description CDIContextBridge()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)voiddestroyOne(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)<U> UfindOrCreate(org.glassfish.hk2.api.ActiveDescriptor<U> activeDescriptor, org.glassfish.hk2.api.ServiceHandle<?> root)Class<? extends Annotation>getScope()booleanisActive()voidshutdown()booleansupportsNullCreation()
-
-
-
Method Detail
-
getScope
public Class<? extends Annotation> getScope()
- Specified by:
getScopein interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
findOrCreate
public <U> U findOrCreate(org.glassfish.hk2.api.ActiveDescriptor<U> activeDescriptor, org.glassfish.hk2.api.ServiceHandle<?> root)- Specified by:
findOrCreatein interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
containsKey
public boolean containsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
- Specified by:
containsKeyin interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
destroyOne
public void destroyOne(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
- Specified by:
destroyOnein interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
supportsNullCreation
public boolean supportsNullCreation()
- Specified by:
supportsNullCreationin interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
-