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
Client Abstraction with prepared methods for Get and Post request using InputStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class io.clonecloudstore.common.quarkus.client.SimpleClientAbstract
exceptionMapper, MDC_COMPRESSED_CONTENT, MDC_COMPRESSED_RESPONSE, MDC_QUERY_HEADERS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClientAbstract(ClientFactoryAbstract<S> factory, URI uri) Constructor used by the Factory -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract OgetApiBusinessOutFromResponseForCreate(jakarta.ws.rs.core.Response response) protected ClientFactoryAbstract<S> getHeadersFor(I businessIn, int context) protected InputStreamBusinessOut<O> getInputStreamBusinessOutFromUni(boolean shallDecompress, io.smallrye.mutiny.Uni<InputStream> inputStreamUni) protected OgetResultFromPostInputStreamUni(io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> uni, InputStream sendInputStream) protected voidprepareInputStreamToReceive(boolean acceptCompressed, I businessIn) protected InputStreamprepareInputStreamToSend(InputStream content, boolean shallCompress, boolean alreadyCompressed, I businessIn) Methods inherited from class io.clonecloudstore.common.quarkus.client.SimpleClientAbstract
acceptCompression, bodyCompressed, close, getCompressionStatusFromHeaders, getDtoFromHeaders, getHeadersMap, getMdcOpId, getOpId, getService, getUri, isAcceptCompression, isBodyCompressed, reopen, resetMdcOpId, resetQueryContext, setCompressionStatusFromHeaders, setDtoFromHeaders, setHeadersMap, setMdcOpId, setOpId
-
Field Details
-
CONTEXT_SENDING
public static final int CONTEXT_SENDING- See Also:
-
CONTEXT_RECEIVE
public static final int CONTEXT_RECEIVE- See Also:
-
-
Constructor Details
-
ClientAbstract
Constructor used by the Factory
-
-
Method Details
-
getApiBusinessOutFromResponseForCreate
- Returns:
- the BusinessOut from the response content and/or headers for Create Operation
-
getHeadersFor
- Parameters:
context- 1 for sending InputStream, -1 for receiving InputStream, or anything else- Returns:
- the headers map
-
getFactory
- Overrides:
getFactoryin classSimpleClientAbstract<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
-
getInputStreamBusinessOutFromUni
protected InputStreamBusinessOut<O> getInputStreamBusinessOutFromUni(boolean shallDecompress, io.smallrye.mutiny.Uni<InputStream> inputStreamUni) throws CcsWithStatusException - Throws:
CcsWithStatusException
-