Record Class McpNetworkTransaction
java.lang.Object
java.lang.Record
com.shaft.mcp.McpNetworkTransaction
- Record Components:
id- 1-based transaction id, usable withbrowser_network_requests' id parammethod- HTTP methodurl- request URLstatus- HTTP response status code, or0when the exchange failedmimeType- responseContent-Typewithout parameters, blank when absentdurationMs- exchange duration in millisecondsrequestSizeBytes- request body size in bytesresponseSizeBytes- response body size in bytestimestamp- epoch millis when the exchange finishedfailureReason- safe failure reason, blank on success
public record McpNetworkTransaction(int id, String method, String url, int status, String mimeType, long durationMs, long requestSizeBytes, long responseSizeBytes, long timestamp, String failureReason)
extends Record
One observed network transaction summary returned by
browser_network_requests, without
headers or bodies.-
Constructor Summary
ConstructorsConstructorDescriptionMcpNetworkTransaction(int id, String method, String url, int status, String mimeType, long durationMs, long requestSizeBytes, long responseSizeBytes, long timestamp, String failureReason) Creates an instance of aMcpNetworkTransactionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureReasonrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.method()Returns the value of themethodrecord component.mimeType()Returns the value of themimeTyperecord component.longReturns the value of therequestSizeBytesrecord component.longReturns the value of theresponseSizeBytesrecord component.intstatus()Returns the value of thestatusrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
McpNetworkTransaction
public McpNetworkTransaction(int id, String method, String url, int status, String mimeType, long durationMs, long requestSizeBytes, long responseSizeBytes, long timestamp, String failureReason) Creates an instance of aMcpNetworkTransactionrecord class.- Parameters:
id- the value for theidrecord componentmethod- the value for themethodrecord componenturl- the value for theurlrecord componentstatus- the value for thestatusrecord componentmimeType- the value for themimeTyperecord componentdurationMs- the value for thedurationMsrecord componentrequestSizeBytes- the value for therequestSizeBytesrecord componentresponseSizeBytes- the value for theresponseSizeBytesrecord componenttimestamp- the value for thetimestamprecord componentfailureReason- the value for thefailureReasonrecord 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. -
id
-
method
-
url
-
status
-
mimeType
-
durationMs
public long durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-
requestSizeBytes
public long requestSizeBytes()Returns the value of therequestSizeBytesrecord component.- Returns:
- the value of the
requestSizeBytesrecord component
-
responseSizeBytes
public long responseSizeBytes()Returns the value of theresponseSizeBytesrecord component.- Returns:
- the value of the
responseSizeBytesrecord component
-
timestamp
-
failureReason
Returns the value of thefailureReasonrecord component.- Returns:
- the value of the
failureReasonrecord component
-