public abstract class WebContextBase extends Context
限定符和类型 | 字段和说明 |
---|---|
protected MultiMap<UploadedFile> |
_fileMap |
charset, errors, result, sessionState
构造器和说明 |
---|
WebContextBase() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
contentCharset()
内存字符集
|
java.lang.String |
contentType()
内存类型
|
void |
filesDelete()
删除所有临时文件
|
protected void |
innerCommit() |
void |
outputAsFile(DownloadedFile file)
输出为文件
|
void |
outputAsFile(java.io.File file)
输出为文件
|
java.util.zip.GZIPOutputStream |
outputStreamAsGzip()
获取输出流 gzip 模式
|
java.lang.String |
path()
获取请求的URI路径
|
<T> T |
session(java.lang.String name,
java.lang.Class<T> clz)
获取 session 状态
|
double |
sessionAsDouble(java.lang.String name)
获取 session 状态,并以 double 型输出
|
double |
sessionAsDouble(java.lang.String name,
double def)
获取 session 状态,并以 double 型输出
|
int |
sessionAsInt(java.lang.String name)
获取 session 状态,并以 int 型输出
|
int |
sessionAsInt(java.lang.String name,
int def)
获取 session 状态,并以 int 型输出
output
|
long |
sessionAsLong(java.lang.String name)
获取 session 状态,并以 long 型输出
|
long |
sessionAsLong(java.lang.String name,
long def)
获取 session 状态,并以 long 型输出
|
void |
sessionClear()
清空 session 状态
|
java.lang.String |
sessionId()
获取 sessionId
|
<T> T |
sessionOrDefault(java.lang.String name,
T def)
获取 session 状态(泛型转换,存在风险)
|
void |
sessionRemove(java.lang.String name)
移除 session 状态
|
void |
sessionReset()
重置 session 状态
|
void |
sessionSet(java.lang.String name,
java.lang.Object val)
设置 session 状态
|
accept, accept, acceptNew, action, asyncComplete, asyncListener, asyncStart, asyncStart, asyncStarted, asyncSupported, attr, attrMap, attrNames, attrOrDefault, attrsClear, attrSet, attrSet, autoMultipart, autoMultipart, body, body, bodyAsBytes, bodyAsStream, bodyNew, bodyNew, charset, close, contentLength, contentLength, contentType, contentTypeDoSet, contentTypeNew, controller, cookie, cookieMap, cookieNames, cookieOrDefault, cookieRemove, cookieSet, cookieSet, cookieSet, cookieSet, cookieSet, cookieValues, current, file, fileMap, fileNames, fileValues, flush, forward, getHandled, getLocale, getRendered, header, headerAdd, headerMap, headerNames, headerNamesOfResponse, headerOfResponse, headerOrDefault, headerSet, headerValues, headerValuesOfResponse, isFormUrlencoded, isMultipart, isMultipartFormData, isSecure, mainHandler, method, output, output, output, output, outputAsHtml, outputAsJson, outputStream, param, paramAsBean, paramAsDecimal, paramAsDecimal, paramAsDouble, paramAsDouble, paramAsInt, paramAsInt, paramAsLong, paramAsLong, paramMap, paramNames, paramOrDefault, paramValues, pathAsLower, pathAsUpper, pathMap, pathNew, pathNew, protocol, protocolAsUpper, pull, queryString, realIp, redirect, redirect, referer, remoteIp, remotePort, remoting, remotingSet, render, render, renderAndReturn, request, response, session, sessionState, sessionState, setHandled, setLocale, setRendered, status, status, statusDoSet, uri, url, userAgent
protected final MultiMap<UploadedFile> _fileMap
public java.lang.String contentType()
contentType
在类中 Context
public java.lang.String contentCharset()
contentCharset
在类中 Context
public java.util.zip.GZIPOutputStream outputStreamAsGzip() throws java.io.IOException
Context
outputStreamAsGzip
在类中 Context
java.io.IOException
public void outputAsFile(DownloadedFile file) throws java.io.IOException
outputAsFile
在类中 Context
java.io.IOException
public void outputAsFile(java.io.File file) throws java.io.IOException
outputAsFile
在类中 Context
java.io.IOException
public final <T> T session(java.lang.String name, java.lang.Class<T> clz)
public final <T> T sessionOrDefault(java.lang.String name, @NonNull T def)
sessionOrDefault
在类中 Context
name
- 状态名public final int sessionAsInt(java.lang.String name)
sessionAsInt
在类中 Context
name
- 状态名public final int sessionAsInt(java.lang.String name, int def)
sessionAsInt
在类中 Context
name
- 状态名public final long sessionAsLong(java.lang.String name)
sessionAsLong
在类中 Context
name
- 状态名public final long sessionAsLong(java.lang.String name, long def)
sessionAsLong
在类中 Context
name
- 状态名public final double sessionAsDouble(java.lang.String name)
sessionAsDouble
在类中 Context
name
- 状态名public final double sessionAsDouble(java.lang.String name, double def)
sessionAsDouble
在类中 Context
name
- 状态名public final void sessionSet(java.lang.String name, java.lang.Object val)
sessionSet
在类中 Context
name
- 状态名val
- 值public final void sessionRemove(java.lang.String name)
sessionRemove
在类中 Context
name
- 状态名public final void sessionClear()
sessionClear
在类中 Context
public void sessionReset()
Context
sessionReset
在类中 Context
public void filesDelete() throws java.io.IOException
filesDelete
在类中 Context
java.io.IOException
protected void innerCommit() throws java.io.IOException
java.io.IOException