- java.lang.Object
-
- org.redkale.net.http.HttpResult<T>
-
-
构造器概要
构造器 构造器 说明 HttpResult()
HttpResult(String contentType, T result)
HttpResult(Convert convert, T result)
HttpResult(T result)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 HttpResult<T>
contentType(String contentType)
Convert
convert()
HttpResult<T>
convert(Convert convert)
HttpResult<T>
cookie(String name, Serializable value)
HttpResult<T>
cookie(String name, Serializable value, boolean httpOnly)
HttpResult<T>
cookie(HttpCookie cookie)
String
getContentType()
List<HttpCookie>
getCookies()
String
getHeader(String name)
String
getHeader(String name, String dfvalue)
Map<String,String>
getHeaders()
T
getResult()
int
getStatus()
HttpResult<T>
header(String name, Serializable value)
boolean
isSuccess()
HttpResult<T>
result(T result)
void
setContentType(String contentType)
void
setCookies(List<HttpCookie> cookies)
void
setHeaders(Map<String,String> headers)
void
setResult(T result)
void
setStatus(int status)
HttpResult<T>
status(int status)
CompletableFuture
toAnyFuture()
CompletableFuture<HttpResult<T>>
toFuture()
String
toString()
-
-
-
字段详细资料
-
status
@ConvertColumn(index=1) protected int status
-
contentType
@ConvertColumn(index=2) protected String contentType
-
headers
@ConvertColumn(index=3) protected Map<String,String> headers
-
cookies
@ConvertColumn(index=4) protected List<HttpCookie> cookies
-
result
@ConvertColumn(index=5) @ConvertCoder(encoder=org.redkale.net.http.HttpResult.ResultJsonCoder.class) protected T result
-
convert
protected Convert convert
-
-
方法详细资料
-
header
public HttpResult<T> header(String name, Serializable value)
-
cookie
public HttpResult<T> cookie(String name, Serializable value)
-
cookie
public HttpResult<T> cookie(String name, Serializable value, boolean httpOnly)
-
cookie
public HttpResult<T> cookie(HttpCookie cookie)
-
contentType
public HttpResult<T> contentType(String contentType)
-
result
public HttpResult<T> result(T result)
-
status
public HttpResult<T> status(int status)
-
convert
public Convert convert()
-
convert
public HttpResult<T> convert(Convert convert)
-
toFuture
public CompletableFuture<HttpResult<T>> toFuture()
-
toAnyFuture
public CompletableFuture toAnyFuture()
-
getCookies
public List<HttpCookie> getCookies()
-
setCookies
public void setCookies(List<HttpCookie> cookies)
-
getContentType
public String getContentType()
-
setContentType
public void setContentType(String contentType)
-
getResult
public T getResult()
-
setResult
public void setResult(T result)
-
getStatus
public int getStatus()
-
setStatus
public void setStatus(int status)
-
isSuccess
public boolean isSuccess()
-
-