Package com.tnsai.mcp.testing
Record Class McpInspectorClient.MessageRecord
java.lang.Object
java.lang.Record
com.tnsai.mcp.testing.McpInspectorClient.MessageRecord
- Record Components:
timestamp- when the message was recordeddirection- "outgoing", "incoming", or "error"method- the JSON-RPC method (if extractable)content- the full message contentlatency- the request-response latency (for incoming messages)
- Enclosing class:
McpInspectorClient
public static record McpInspectorClient.MessageRecord(Instant timestamp, String direction, String method, String content, Duration latency)
extends Record
A recorded message with metadata.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.latency()Returns the value of thelatencyrecord component.method()Returns the value of themethodrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
latency
Returns the value of thelatencyrecord component.- Returns:
- the value of the
latencyrecord component
-