Interface TcpRequest

All Superinterfaces:
BaseRequest
All Known Subinterfaces:
Request, TcpRequest

public interface TcpRequest extends BaseRequest
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 Type
    Method
    Description
    io.reactivex.rxjava3.core.Flowable<Buffer>
    Get the current request body chunks as Flowable of Buffer.
    void
    chunks(io.reactivex.rxjava3.core.Flowable<Buffer> chunks)
    Set the current request body chunks from a Flowable of Buffer.
    void
    pipeUpstream(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

      void chunks(io.reactivex.rxjava3.core.Flowable<Buffer> chunks)
      Set the current request body chunks from a Flowable of Buffer.

      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 - the Flowable of 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 as Flowable of Buffer.

      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 Flowable containing the current body request chunks.