Interface TcpRequest
- All Superinterfaces:
BaseRequest
- All Known Subinterfaces:
Request,TcpRequest
Request specialized for TCP allowing piping traffic from client to backend.
- Author:
- Benoit BORDIGONI (benoit.bordigoni at graviteesource.com), GraviteeSource Team
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Flowable<Buffer>chunks()Get the current request body chunks asFlowableofBuffer.voidSet the current request body chunks from aFlowableofBuffer.voidpipeUpstream(io.reactivex.rxjava3.core.Completable pipe) Set a completable that pipes upstream traffic bytes from the client to the backend
-
Method Details
-
pipeUpstream
void pipeUpstream(io.reactivex.rxjava3.core.Completable pipe) Set a completable that pipes upstream traffic bytes from the client to the backend- Parameters:
pipe- the completable to perform the action
-
chunks
Set the current request body chunks from aFlowableofBuffer.This is useful to directly pump the upstream chunks to the downstream without having to load all the chunks in memory.
WARN:
- replacing the request chunks will NOT "drain" the previous request that was in place.
- You MUST ensure to consume the previous chunks by yourself when using it.
- Parameters:
chunks- theFlowableof chunks representing the request body that will be pushed to the upstream.
-
chunks
io.reactivex.rxjava3.core.Flowable<Buffer> chunks()Get the current request body chunks asFlowableofBuffer.This is useful when you want to manipulate the entire body without having to load it in memory.
WARN: you should not keep a direct reference on the body chunks as they could be overridden by others at anytime.
- Returns:
- a
Flowablecontaining the current body request chunks.
-