类 MessageParser
java.lang.Object
cn.tbox.sdk.model.message.MessageParser
Message parser.
Used to parse HTTP SSE response messages.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Gets the answers holder.booleanneedParse(HttpResponseEvent responseEvent) Checks if the response event needs to be parsed.parse(HttpResponseEvent responseEvent) Parses a response event.
-
构造器详细资料
-
MessageParser
public MessageParser()
-
-
方法详细资料
-
needParse
Checks if the response event needs to be parsed.- 参数:
responseEvent- HTTP response event- 返回:
- true if needs parsing, false otherwise
-
parse
Parses a response event.- 参数:
responseEvent- HTTP response event- 返回:
- Parsed data as a map
- 抛出:
TboxServerException- if there's a server error
-
getAnswersHolder
Gets the answers holder.- 返回:
- The answers holder map
-