类 HttpEventTask
java.lang.Object
com.alibaba.csp.sentinel.transport.command.http.HttpEventTask
- 所有已实现的接口:
Runnable
The task handles incoming command request in HTTP protocol.
- 作者:
- youji.zj, Eric Zhao, Jason Joo
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclose()protected static voidparseParams(String queryString, com.alibaba.csp.sentinel.command.CommandRequest request) Consume all the body submitted and parse params intoCommandRequestProcess header line in requestprotected static voidparseSingleParam(String single, com.alibaba.csp.sentinel.command.CommandRequest request) protected static voidprocessPostRequest(InputStream in, com.alibaba.csp.sentinel.command.CommandRequest request) Try to process the body of POST request additionally.protected static com.alibaba.csp.sentinel.command.CommandRequestprocessQueryString(String line) Parse raw HTTP request line to aCommandRequest.protected static StringremoveAnchor(String str) Truncate query from "a=1&b=2#mark" to "a=1&b=2"voidrun()
-
字段详细资料
-
构造器详细资料
-
HttpEventTask
-
-
方法详细资料
-
close
- 抛出:
Exception
-
run
public void run() -
processPostRequest
protected static void processPostRequest(InputStream in, com.alibaba.csp.sentinel.command.CommandRequest request) throws RequestException, IOException Try to process the body of POST request additionally.- 参数:
in-request-- 抛出:
RequestExceptionIOException
-
parsePostHeaders
Process header line in request- 参数:
in-- 返回:
- return headers in a Map, null for illegal request
- 抛出:
IOException
-
parseParams
protected static void parseParams(String queryString, com.alibaba.csp.sentinel.command.CommandRequest request) Consume all the body submitted and parse params intoCommandRequest- 参数:
queryString-request-
-
processQueryString
Parse raw HTTP request line to aCommandRequest.- 参数:
line- HTTP request line- 返回:
- parsed command request
-
removeAnchor
Truncate query from "a=1&b=2#mark" to "a=1&b=2"- 参数:
str-- 返回:
-
parseSingleParam
protected static void parseSingleParam(String single, com.alibaba.csp.sentinel.command.CommandRequest request)
-