-
public interface HttpCodecEncodes HTTP requests and decodes HTTP responses.
-
-
Method Summary
Modifier and Type Method Description abstract SinkcreateRequestBody(MobonRequest mobonRequest, long contentLength)Returns an output stream where the mobonRequest body can be streamed. abstract voidwriteRequestHeaders(MobonRequest mobonRequest)This should update the HTTP engine's sentRequestMillis field. abstract voidflushRequest()Flush the request to the underlying socket. abstract voidfinishRequest()Flush the request to the underlying socket and signal no more bytes will be transmitted. abstract MobonResponse.BuilderreadResponseHeaders(boolean expectContinue)Parses bytes of a response header from an HTTP transport. abstract ResponseBodyopenResponseBody(MobonResponse mobonResponse)Returns a stream that reads the mobonResponse body. abstract voidcancel()Cancel this stream. -
-
Method Detail
-
createRequestBody
abstract Sink createRequestBody(MobonRequest mobonRequest, long contentLength)
Returns an output stream where the mobonRequest body can be streamed.
-
writeRequestHeaders
abstract void writeRequestHeaders(MobonRequest mobonRequest)
This should update the HTTP engine's sentRequestMillis field.
-
flushRequest
abstract void flushRequest()
Flush the request to the underlying socket.
-
finishRequest
abstract void finishRequest()
Flush the request to the underlying socket and signal no more bytes will be transmitted.
-
readResponseHeaders
abstract MobonResponse.Builder readResponseHeaders(boolean expectContinue)
Parses bytes of a response header from an HTTP transport.
- Parameters:
expectContinue- true to return null if this is an intermediate response with a "100"response code.
-
openResponseBody
abstract ResponseBody openResponseBody(MobonResponse mobonResponse)
Returns a stream that reads the mobonResponse body.
-
cancel
abstract void cancel()
Cancel this stream. Resources held by this stream will be cleaned up, though not synchronously.That may happen later by the connection pool thread.
-
-
-
-