public class JobContext extends ActContext.Base<JobContext>
Communicate context data across threads
ActContext.Base<CTX extends ActContext.Base>, ActContext.Listener
Destroyable.Util
logger
ATTR_CUR_METHOD
Modifier and Type | Method and Description |
---|---|
org.osgl.http.H.Format |
accept() |
JobContext |
accept(org.osgl.http.H.Format fmt) |
static JobContext |
current() |
static <T> T |
get(java.lang.String key)
Get value by key from the JobContext of current thread
|
static <T> T |
get(java.lang.String key,
java.lang.Class<T> clz)
Generic version of getting value by key from the JobContext of current thread
|
static boolean |
initialized()
Whether JobContext of current thread initialized
|
java.lang.String |
methodPath() |
java.util.Set<java.lang.String> |
paramKeys() |
java.lang.String |
paramVal(java.lang.String s) |
java.lang.String[] |
paramVals(java.lang.String s) |
static void |
put(java.lang.String key,
java.lang.Object val)
Set value by key to the JobContext of current thread
|
static void |
remove(java.lang.String key)
Remove value by key from the JobContext of current thread
|
_act_i18n, addDestroyable, addListener, addViolation, addViolations, app, attribute, attribute, attributes, cachedTemplate, cacheTemplate, config, currentContext, currentContextType, dataPattern, disableTemplateCaching, fieldOutputVarCount, fieldOutputVarCount, handlerMethod, handlerMethod, hasRenderArgs, hasViolation, i18n, i18n, i18n, i18n, i18n, i18n, i18n, i18n, i18n, i18n, locale, locale, locale, me, pattern, pattern, progress, releaseResources, removeAttribute, renderArg, renderArg, renderArgs, sessionId, setJobId, strBuf, templateContent, templateContent, templateContext, templateContext, templateLiteral, templatePath, templatePath, templatePathIsImplicit, violation, violations
addSubResource, destroy, isDestroyed, reload, scope
debug, debug, error, error, fatal, fatal, info, info, isDebugEnabled, isTraceEnabled, trace, trace, warn, warn
public static boolean initialized()
Whether JobContext of current thread initialized
true
if current job context is not nullpublic static JobContext current()
public JobContext accept(org.osgl.http.H.Format fmt)
public org.osgl.http.H.Format accept()
public java.lang.String methodPath()
public java.util.Set<java.lang.String> paramKeys()
public java.lang.String paramVal(java.lang.String s)
public java.lang.String[] paramVals(java.lang.String s)
public static <T> T get(java.lang.String key)
Get value by key from the JobContext of current thread
T
- the val typekey
- the keypublic static <T> T get(java.lang.String key, java.lang.Class<T> clz)
Generic version of getting value by key from the JobContext of current thread
T
- the val typekey
- the keyclz
- the val classpublic static void put(java.lang.String key, java.lang.Object val)
Set value by key to the JobContext of current thread
key
- the keyval
- the valuepublic static void remove(java.lang.String key)
Remove value by key from the JobContext of current thread
key
- the keyCopyright © 2014–2017 ActFramework. All rights reserved.