|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.inject.servlet.ServletScopes
public class ServletScopes
Servlet scopes.
| Field Summary | |
|---|---|
static Scope |
REQUEST
HTTP servlet request scope. |
static Scope |
SESSION
HTTP session scope. |
| Method Summary | ||
|---|---|---|
static
|
continueRequest(Callable<T> callable,
Map<Key<?>,Object> seedMap)
Wraps the given callable in a contextual callable that "continues" the HTTP request in another thread. |
|
static
|
scopeRequest(Callable<T> callable,
Map<Key<?>,Object> seedMap)
Scopes the given callable inside a request scope. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Scope REQUEST
public static final Scope SESSION
| Method Detail |
|---|
public static <T> Callable<T> continueRequest(Callable<T> callable,
Map<Key<?>,Object> seedMap)
There are some limitations:
callable - code to be executed in another thread, which depends on
the request scope.seedMap - the initial set of scoped instances for Guice to seed the
request scope with. To seed a key with null, use null as
the value.
OutOfScopeException - if this method is called from a non-request
thread, or if the request has completed.
public static <T> Callable<T> scopeRequest(Callable<T> callable,
Map<Key<?>,Object> seedMap)
callable - code to be executed which depends on the request scope.
Typically in another thread, but not necessarily so.seedMap - the initial set of scoped instances for Guice to seed the
request scope with. To seed a key with null, use null as
the value.
seedMap as scoped keys.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||