@Singleton public class RequestContext extends Object implements Context<RequestScoped>
RequestScope
and provide request-scoped descriptors to HK2 DI provider to create or
destroy instances.Modifier and Type | Class and Description |
---|---|
static class |
RequestContext.Binder
Request scope injection binder.
|
Constructor and Description |
---|
RequestContext(RequestScope requestScope) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(ActiveDescriptor<?> descriptor) |
void |
destroyOne(ActiveDescriptor<?> descriptor) |
<U> U |
findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root) |
Class<? extends Annotation> |
getScope() |
boolean |
isActive() |
void |
shutdown() |
boolean |
supportsNullCreation() |
@Inject public RequestContext(RequestScope requestScope)
public Class<? extends Annotation> getScope()
getScope
in interface Context<RequestScoped>
public <U> U findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)
findOrCreate
in interface Context<RequestScoped>
public boolean containsKey(ActiveDescriptor<?> descriptor)
containsKey
in interface Context<RequestScoped>
public boolean supportsNullCreation()
supportsNullCreation
in interface Context<RequestScoped>
public boolean isActive()
isActive
in interface Context<RequestScoped>
public void destroyOne(ActiveDescriptor<?> descriptor)
destroyOne
in interface Context<RequestScoped>
public void shutdown()
shutdown
in interface Context<RequestScoped>
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.