public class Hk2RequestScope
extends org.glassfish.jersey.process.internal.RequestScope
Modifier and Type | Class and Description |
---|---|
static class |
Hk2RequestScope.Instance
Implementation of the request scope instance.
|
Constructor and Description |
---|
Hk2RequestScope() |
Modifier and Type | Method and Description |
---|---|
org.glassfish.jersey.process.internal.RequestContext |
createContext()
Creates a new instance of the
request scope context . |
public org.glassfish.jersey.process.internal.RequestContext createContext()
org.glassfish.jersey.process.internal.RequestScope
request 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 org.glassfish.jersey.process.internal.RequestScope
Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.