public class RequestContext extends Object
| Constructor and Description |
|---|
RequestContext(ThreadLocal<Map<String,RequestContext>> threadLocal,
String sourceName)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clean all data
|
<T> T |
get(String name,
Class<T> clazz)
get thread variable
|
io.sermant.flowcontrol.common.entity.RequestEntity |
getRequestEntity() |
String |
getSourceName() |
boolean |
hasKey(String key)
Whether the specified key exists in the thread variable
|
void |
remove(String name)
remove thread variable
|
void |
save(String name,
Object target)
save thread variable
|
void |
setRequestEntity(io.sermant.flowcontrol.common.entity.RequestEntity requestEntity) |
public RequestContext(ThreadLocal<Map<String,RequestContext>> threadLocal, String sourceName)
threadLocal - thread variablesourceName - source namepublic void save(String name, Object target)
name - variable nametarget - save objectpublic <T> T get(String name, Class<T> clazz)
T - return typename - nameclazz - specified typepublic void remove(String name)
name - variable namepublic void clear()
public io.sermant.flowcontrol.common.entity.RequestEntity getRequestEntity()
public void setRequestEntity(io.sermant.flowcontrol.common.entity.RequestEntity requestEntity)
public String getSourceName()
public boolean hasKey(String key)
key - thread variable keyCopyright © 2025. All rights reserved.