public class RequestContext extends Object
| Constructor and Description |
|---|
RequestContext() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
get(String key)
Get's the value for a given key from the request context.
|
static Map<String,Object> |
getContextMap()
Get's a snapshot of the request context as a a Map
|
static void |
initialize()
initialize an empty request context, it will cleanup previous value of the threadlocal if used in a threadpool
|
static void |
initialize(Map<String,Object> ctxt)
initialize a new request context with the given context, it will cleanup previous value of
the threadlocal if it is being used in a threadpool
|
static void |
set(String key,
Object value)
Set's the value for a given key in the request context, this value will be accessible from the context
using the get method.
|
static void |
shutDown()
Shuts down the request context by cleaning up the threadlocal.
|
public static void initialize()
public static void initialize(Map<String,Object> ctxt)
ctxt - Context mappublic static void set(String key, Object value)
key - Key to setvalue - Value to setpublic static Object get(String key)
key - Key to getObject - Value for given keypublic static Map<String,Object> getContextMap()
public static void shutDown()
Copyright © 2016. All rights reserved.