Class IdempotencyResponse
java.lang.Object
io.github.ravocode.avoonce.core.domain.IdempotencyResponse
Immutable value object encapsulating the cached HTTP response for a
successfully
processed idempotent request.
When an idempotency record transitions to
IdempotencyStatus.COMPLETED,
the response is stored in this object so that subsequent retries with the
same key
receive an exact replay of the original response — including status code,
headers,
and raw body bytes.
-
Constructor Summary
ConstructorsConstructorDescriptionIdempotencyResponse(int statusCode, Map<String, List<String>> headers, byte[] body) Constructs anIdempotencyResponsecapturing the full HTTP response. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBody()Returns the raw serialized response body bytes.Returns the captured HTTP response headers.intReturns the HTTP status code of the cached response.
-
Constructor Details
-
IdempotencyResponse
-
-
Method Details
-
getStatusCode
public int getStatusCode()Returns the HTTP status code of the cached response.- Returns:
- the HTTP status code (e.g. 200, 201, 204).
-
getHeaders
-
getBody
public byte[] getBody()Returns the raw serialized response body bytes.- Returns:
- the response body byte array; may be
nullor empty for bodyless responses.
-