Record Class ApiTransaction
java.lang.Object
java.lang.Record
com.shaft.capture.generate.api.ApiTransaction
- Record Components:
transactionId- stable transaction identifier from the recordingmethod- HTTP methodurl- request URLorigin-scheme://host[:port]of the request URL, used to group transactions by origin during renderingrequestHeaders- sanitized request headersrequestBody- resolved request body text (empty if none/binary/oversized/unavailable)statusCode- response status code (0 if there was no response, e.g. a failed transaction)responseHeaders- sanitized response headersresponseBody- resolved response body text (empty if none/binary/oversized/unavailable)responseLeaves- classified leaves of the response body (seeResponseNormalizer)- sequence number of the UI capture event this transaction is correlated with, ornullwhen the transaction was not recorded as part of a hybrid UI+API session
public record ApiTransaction(String transactionId, String method, String url, String origin, Map<String,String> requestHeaders, String requestBody, int statusCode, Map<String,String> responseHeaders, String responseBody, List<ResponseLeaf> responseLeaves, Long correlatedUiSequence)
extends Record
One recorded API transaction with resolved (not just referenced) request/response body text,
ready for classification, correlation, and rendering.
-
Constructor Summary
ConstructorsConstructorDescriptionApiTransaction(String transactionId, String method, String url, String origin, Map<String, String> requestHeaders, String requestBody, int statusCode, Map<String, String> responseHeaders, String responseBody, List<ResponseLeaf> responseLeaves) Compatibility constructor for callers compiled before hybrid UI correlation was added.ApiTransaction(String transactionId, String method, String url, String origin, Map<String, String> requestHeaders, String requestBody, int statusCode, Map<String, String> responseHeaders, String responseBody, List<ResponseLeaf> responseLeaves, Long correlatedUiSequence) Creates an instance of aApiTransactionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecorrelatedUiSequencerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.method()Returns the value of themethodrecord component.origin()Returns the value of theoriginrecord component.Returns the value of therequestBodyrecord component.Returns the value of therequestHeadersrecord component.Returns the value of theresponseBodyrecord component.Returns the value of theresponseHeadersrecord component.Returns the value of theresponseLeavesrecord component.intReturns the value of thestatusCoderecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransactionIdrecord component.url()Returns the value of theurlrecord component.
-
Constructor Details
-
ApiTransaction
public ApiTransaction(String transactionId, String method, String url, String origin, Map<String, String> requestHeaders, String requestBody, int statusCode, Map<String, String> responseHeaders, String responseBody, List<ResponseLeaf> responseLeaves, Long correlatedUiSequence) Creates an instance of aApiTransactionrecord class.- Parameters:
transactionId- the value for thetransactionIdrecord componentmethod- the value for themethodrecord componenturl- the value for theurlrecord componentorigin- the value for theoriginrecord componentrequestHeaders- the value for therequestHeadersrecord componentrequestBody- the value for therequestBodyrecord componentstatusCode- the value for thestatusCoderecord componentresponseHeaders- the value for theresponseHeadersrecord componentresponseBody- the value for theresponseBodyrecord componentresponseLeaves- the value for theresponseLeavesrecord componentcorrelatedUiSequence- the value for thecorrelatedUiSequencerecord component
-
ApiTransaction
public ApiTransaction(String transactionId, String method, String url, String origin, Map<String, String> requestHeaders, String requestBody, int statusCode, Map<String, String> responseHeaders, String responseBody, List<ResponseLeaf> responseLeaves) Compatibility constructor for callers compiled before hybrid UI correlation was added.- Parameters:
transactionId- stable transaction identifier from the recordingmethod- HTTP methodurl- request URLorigin-scheme://host[:port]of the request URLrequestHeaders- sanitized request headersrequestBody- resolved request body textstatusCode- response status coderesponseHeaders- sanitized response headersresponseBody- resolved response body textresponseLeaves- classified leaves of the response body
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
transactionId
Returns the value of thetransactionIdrecord component.- Returns:
- the value of the
transactionIdrecord component
-
method
-
url
-
origin
-
requestHeaders
Returns the value of therequestHeadersrecord component.- Returns:
- the value of the
requestHeadersrecord component
-
requestBody
Returns the value of therequestBodyrecord component.- Returns:
- the value of the
requestBodyrecord component
-
statusCode
public int statusCode()Returns the value of thestatusCoderecord component.- Returns:
- the value of the
statusCoderecord component
-
responseHeaders
Returns the value of theresponseHeadersrecord component.- Returns:
- the value of the
responseHeadersrecord component
-
responseBody
Returns the value of theresponseBodyrecord component.- Returns:
- the value of the
responseBodyrecord component
-
responseLeaves
Returns the value of theresponseLeavesrecord component.- Returns:
- the value of the
responseLeavesrecord component
-