| 限定符和类型 | 字段和说明 |
|---|---|
protected Invoker |
dataContext |
REQUEST_KEY, RESPONSE_KEY, RETURN_DATA_KEY, ROOT_DATA_KEY| 构造器和说明 |
|---|
InvokerWrap(Invoker dataContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> Future<T> |
asyncExecute(net.hasor.utils.function.EFunction<Invoker,T,Throwable> consumer)
安排一个异步任务来执行接下来的任务。
|
<T> Future<T> |
asyncExecute(net.hasor.utils.function.EFunction<Invoker,T,Throwable> consumer,
Executor executor)
安排一个异步任务来执行接下来的任务。
|
String |
contentType()
设置内容类型类型,如果没有配置那么会通过 renderType 配置进行自动推断,若 @RenderType 也未配置,那么不会进行任何操作。
|
void |
contentType(String contentType)
设置内容类型类型,如果没有配置那么会通过 renderType 配置进行自动推断,若 @RenderType 也未配置,那么不会进行任何操作。
|
<T> T |
fillForm(Class<? extends T> formType,
T bean)
将Request中的参数填充到 formType 类型对象上,类型实例由参数指定
|
AppContext |
getAppContext()
获取当前
AppContext 对象。 |
javax.servlet.http.HttpServletRequest |
getHttpRequest()
获取
HttpServletRequest 对象。 |
javax.servlet.http.HttpServletResponse |
getHttpResponse()
获取
HttpServletResponse 对象。 |
String |
getJsonBodyString()
如果请求是 application/json 类型的,那么可以通过这个方法获取 Json 数据
|
String |
getMimeType(String suffix)
获取MimeType类型
|
boolean |
isLockKey(String key)
判断一个 key 是否被 lock 了。
|
void |
lockKey(String key)
将一个 key 进行锁定。
|
Mapping |
ownerMapping()
本次请求的 Action,如果没有命中任何 Mapping 那么会返回空。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeIfAbsent, fillForm, forEach, get, getOrDefault, getOrMap, getRequestPath, keySet, put, putIfAbsent, removeprotected final Invoker dataContext
public InvokerWrap(Invoker dataContext)
public AppContext getAppContext()
InvokerAppContext 对象。getAppContext 在接口中 Invokerpublic javax.servlet.http.HttpServletRequest getHttpRequest()
InvokerHttpServletRequest 对象。getHttpRequest 在接口中 Invokerpublic javax.servlet.http.HttpServletResponse getHttpResponse()
InvokerHttpServletResponse 对象。getHttpResponse 在接口中 Invokerpublic <T> Future<T> asyncExecute(net.hasor.utils.function.EFunction<Invoker,T,Throwable> consumer, Executor executor)
InvokerasyncExecute 在接口中 Invokerpublic <T> Future<T> asyncExecute(net.hasor.utils.function.EFunction<Invoker,T,Throwable> consumer)
InvokerasyncExecute 在接口中 Invokerpublic String contentType()
InvokercontentType 在接口中 Invokerpublic void contentType(String contentType)
InvokercontentType 在接口中 Invokerpublic Mapping ownerMapping()
InvokerownerMapping 在接口中 Invokerpublic String getJsonBodyString()
InvokergetJsonBodyString 在接口中 Invokerpublic <T> T fillForm(Class<? extends T> formType, T bean)
Invokerpublic void lockKey(String key)
InvokerUnsupportedOperationException 类型异常。public String getMimeType(String suffix)
MimeTypegetMimeType 在接口中 MimeTypeCopyright © 2020–2021. All rights reserved.