Record Class ProxyTransaction
java.lang.Object
java.lang.Record
com.shaft.capture.proxy.ProxyTransaction
- Record Components:
method- HTTP methodurl- reconstructed absolute request URLrequestHeaders- raw request headers, in wire orderrequestBody- raw request body bytes (empty if none)statusCode- response status code (0 if no response was received, e.g. a failed transaction)responseHeaders- raw response headers, in wire order (empty if no response)responseBody- raw response body bytes (empty if none)
public record ProxyTransaction(String method, String url, Map<String,String> requestHeaders, byte[] requestBody, int statusCode, Map<String,String> responseHeaders, byte[] responseBody)
extends Record
One raw HTTP(S) transaction captured by
ApiCaptureProxyServer, before any redaction,
classification, or session-model wrapping. A higher-level controller is responsible for turning
this into a first-class CaptureEvent.NetworkEvent the same way
com.shaft.capture.network.CaptureNetworkRecorder's raw callbacks are wrapped by
ManagedCaptureRecorder -- this module has no dependency on session/store types, only on
shaft-capture's model, which it does not construct directly.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.byte[]Returns the value of therequestBodyrecord component.Returns the value of therequestHeadersrecord component.byte[]Returns the value of theresponseBodyrecord component.Returns the value of theresponseHeadersrecord component.intReturns the value of thestatusCoderecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
ProxyTransaction
public ProxyTransaction(String method, String url, Map<String, String> requestHeaders, byte[] requestBody, int statusCode, Map<String, String> responseHeaders, byte[] responseBody) Creates an instance of aProxyTransactionrecord class.- Parameters:
method- the value for themethodrecord componenturl- the value for theurlrecord 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 component
-
-
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. -
method
-
url
-
requestHeaders
Returns the value of therequestHeadersrecord component.- Returns:
- the value of the
requestHeadersrecord component
-
requestBody
public byte[] 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
public byte[] responseBody()Returns the value of theresponseBodyrecord component.- Returns:
- the value of the
responseBodyrecord component
-