Class ClientAbstract<I,O,S extends Closeable>

java.lang.Object
io.clonecloudstore.common.quarkus.client.SimpleClientAbstract<S>
io.clonecloudstore.common.quarkus.client.ClientAbstract<I,O,S>
Type Parameters:
I - the type for Business Input request (in GET or POST)
O - the type for Business Output request (in POST)
S - the type for the Rest Service as Quarkus definition
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
AccessorObjectApiClient, AccessorObjectInternalApiClient, LocalReplicatorApiClient, RemoteReplicatorApiClient

public abstract class ClientAbstract<I,O,S extends Closeable> extends SimpleClientAbstract<S>
Client Abstraction with prepared methods for Get and Post request using InputStream
  • Field Details

  • Constructor Details

  • Method Details

    • getApiBusinessOutFromResponseForCreate

      protected abstract O getApiBusinessOutFromResponseForCreate(jakarta.ws.rs.core.Response response)
      Returns:
      the BusinessOut from the response content and/or headers for Create Operation
    • getHeadersFor

      protected abstract Map<String,String> getHeadersFor(I businessIn, int context)
      Parameters:
      context - 1 for sending InputStream, -1 for receiving InputStream, or anything else
      Returns:
      the headers map
    • getFactory

      protected ClientFactoryAbstract<S> getFactory()
      Overrides:
      getFactory in class SimpleClientAbstract<S extends Closeable>
      Returns:
      the Factory used by this client
    • prepareInputStreamToSend

      protected InputStream prepareInputStreamToSend(InputStream content, boolean shallCompress, boolean alreadyCompressed, I businessIn)
    • getResultFromPostInputStreamUni

      protected O getResultFromPostInputStreamUni(io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> uni, InputStream sendInputStream) throws CcsWithStatusException
      Throws:
      CcsWithStatusException
    • prepareInputStreamToReceive

      protected void prepareInputStreamToReceive(boolean acceptCompressed, I businessIn)
    • getInputStreamBusinessOutFromUni

      protected InputStreamBusinessOut<O> getInputStreamBusinessOutFromUni(boolean shallDecompress, io.smallrye.mutiny.Uni<InputStream> inputStreamUni) throws CcsWithStatusException
      Throws:
      CcsWithStatusException