Package org.glassfish.jersey.inject.hk2
Class RequestContext
- java.lang.Object
-
- org.glassfish.jersey.inject.hk2.RequestContext
-
- All Implemented Interfaces:
Context<RequestScoped>
@Singleton public class RequestContext extends Object implements Context<RequestScoped>
Class is able to communicate withRequestScopeand provide request-scoped descriptors to HK2 DI provider to create or destroy instances.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequestContext.BinderRequest scope injection binder.
-
Constructor Summary
Constructors Constructor Description RequestContext(RequestScope requestScope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(ActiveDescriptor<?> descriptor)voiddestroyOne(ActiveDescriptor<?> descriptor)<U> UfindOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)Class<? extends Annotation>getScope()booleanisActive()voidshutdown()booleansupportsNullCreation()
-
-
-
Constructor Detail
-
RequestContext
@Inject public RequestContext(RequestScope requestScope)
-
-
Method Detail
-
getScope
public Class<? extends Annotation> getScope()
- Specified by:
getScopein interfaceContext<RequestScoped>
-
findOrCreate
public <U> U findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)
- Specified by:
findOrCreatein interfaceContext<RequestScoped>
-
containsKey
public boolean containsKey(ActiveDescriptor<?> descriptor)
- Specified by:
containsKeyin interfaceContext<RequestScoped>
-
supportsNullCreation
public boolean supportsNullCreation()
- Specified by:
supportsNullCreationin interfaceContext<RequestScoped>
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceContext<RequestScoped>
-
destroyOne
public void destroyOne(ActiveDescriptor<?> descriptor)
- Specified by:
destroyOnein interfaceContext<RequestScoped>
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceContext<RequestScoped>
-
-