Package org.glassfish.jersey.inject.hk2
Class RequestContext
java.lang.Object
org.glassfish.jersey.inject.hk2.RequestContext
- All Implemented Interfaces:
org.glassfish.hk2.api.Context<RequestScoped>
@Singleton
public class RequestContext
extends Object
implements org.glassfish.hk2.api.Context<RequestScoped>
Class is able to communicate with
RequestScope
and provide request-scoped descriptors to HK2 DI provider to create or
destroy instances.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Request scope injection binder. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
-
Field Details
-
requestScope
-
-
Constructor Details
-
RequestContext
-
-
Method Details
-
getScope
- Specified by:
getScope
in interfaceorg.glassfish.hk2.api.Context<RequestScoped>
-
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<RequestScoped>
-
containsKey
public boolean containsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor) - Specified by:
containsKey
in interfaceorg.glassfish.hk2.api.Context<RequestScoped>
-
supportsNullCreation
public boolean supportsNullCreation()- Specified by:
supportsNullCreation
in interfaceorg.glassfish.hk2.api.Context<RequestScoped>
-
isActive
public boolean isActive()- Specified by:
isActive
in interfaceorg.glassfish.hk2.api.Context<RequestScoped>
-
destroyOne
public void destroyOne(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor) - Specified by:
destroyOne
in interfaceorg.glassfish.hk2.api.Context<RequestScoped>
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceorg.glassfish.hk2.api.Context<RequestScoped>
-