public class Hk2RequestScope extends RequestScope
| Modifier and Type | Class and Description |
|---|---|
static class |
Hk2RequestScope.Instance
Implementation of the request scope instance.
|
RequestScope.RequestScopeConfigurator| Constructor and Description |
|---|
Hk2RequestScope() |
| Modifier and Type | Method and Description |
|---|---|
RequestContext |
createContext()
Creates a new instance of the
request scope context. |
activate, current, isActive, referenceCurrent, release, resume, runInScope, runInScope, runInScope, runInScope, runInScope, runInScope, shutdown, suspend, suspendCurrentpublic RequestContext createContext()
RequestScoperequest scope context.
This instance can be then used to run task in the request scope. Returned context
is suspended by default and must therefore be closed explicitly as it is shown in
the following example:
RequestContext context = requestScope.createContext(); requestScope.runInScope(context, someRunnableTask); context.release();
createContext in class RequestScopeCopyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.