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 boolean
containsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
void
destroyOne(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
<U> U
findOrCreate(org.glassfish.hk2.api.ActiveDescriptor<U> activeDescriptor, org.glassfish.hk2.api.ServiceHandle<?> root)
Class<? extends Annotation>
getScope()
boolean
isActive()
void
shutdown()
boolean
supportsNullCreation()
-
-
-
Method Detail
-
getScope
public Class<? extends Annotation> getScope()
- Specified by:
getScope
in 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:
findOrCreate
in interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
containsKey
public boolean containsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
- Specified by:
containsKey
in interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
destroyOne
public void destroyOne(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
- Specified by:
destroyOne
in interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
supportsNullCreation
public boolean supportsNullCreation()
- Specified by:
supportsNullCreation
in interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceorg.glassfish.hk2.api.Context<CDIScope>
-
-