-
- 类型参数:
T-
public interface AsyncHTTPResponseHandler<T>Consumer the response body, and when consumer finished, return the transformed value. The implementations should not block caller thread.- The onHeader() method would be called first, when http headers has been fully received.
- Then may call onBodyChunk() method one or more time
- Then onBodyEnd() method would be called to fetch the result
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 voidonBodyChunk(ByteBuffer buffer)The passed in ByteBuffer may be reused at next call.TonBodyEnd()Get the valued transformed from response body.default voidonHeader(int statusCode, HTTPHeaders headers, Supplier<Charset> charset)Called when header arrived.
-
-
-
方法详细资料
-
onHeader
default void onHeader(int statusCode, HTTPHeaders headers, Supplier<Charset> charset) throws ExceptionCalled when header arrived.- 抛出:
Exception
-
onBodyChunk
void onBodyChunk(ByteBuffer buffer) throws Exception
The passed in ByteBuffer may be reused at next call.- 参数:
buffer- the ByteBuffer- 抛出:
Exception
-
-