- java.lang.Object
-
- org.redkale.net.http.HttpScope
-
public class HttpScope extends Object
HTTP输出引擎的对象域
输出引擎的核心类, 业务开发人员只有通过本类对象才能调用到输出引擎功能。
HttpServlet调用:
@HttpMapping(url = "/hello.html", auth = false) public void hello(HttpRequest req, HttpResponse resp) throws IOException { resp.finish(HttpScope.refer("/hello.html").attr("content", "哈哈")); }
RestService调用:
@RestMapping(name = "hello.html", auth = false) public HttpScope hello() { return HttpScope.refer("hello.html").attr("content", "哈哈"); }
详情见: https://redkale.org- 作者:
- zhangjx
-
-
构造器概要
构造器 构造器 说明 HttpScope()
-
方法概要
-
-
-
字段详细资料
-
NIL
public static final Object NIL
-
referid
@ConvertColumn(index=1) protected String referid
-
referObj
@ConvertColumn(index=2) protected Object referObj
-
attributes
@ConvertColumn(index=3) protected Map<String,Object> attributes
-
headers
@ConvertColumn(index=4) protected Map<String,String> headers
-
cookies
@ConvertColumn(index=5) protected List<HttpCookie> cookies
-
-
方法详细资料
-
create
public static HttpScope create(String template, String name1, Object value1, String name2, Object value2)
-
create
public static HttpScope create(String template, String name1, Object value1, String name2, Object value2, String name3, Object value3)
-
create
public static HttpScope create(String template, String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4)
-
create
public static HttpScope create(String template, String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5)
-
recycle
public boolean recycle()
-
find
public <T> T find(String name)
-
forEach
public void forEach(BiConsumer<String,Object> action)
-
header
public HttpScope header(String name, Serializable value)
-
cookie
public HttpScope cookie(String name, Serializable value)
-
cookie
public HttpScope cookie(String name, Serializable value, boolean httpOnly)
-
cookie
public HttpScope cookie(HttpCookie cookie)
-
getCookies
public List<HttpCookie> getCookies()
-
setCookies
public void setCookies(List<HttpCookie> cookies)
-
getReferid
public String getReferid()
-
setReferid
public void setReferid(String referid)
-
getReferObj
public Object getReferObj()
-
setReferObj
public void setReferObj(Object referObj)
-
-