Record Class SessionEvent.ResponseEvent
java.lang.Object
java.lang.Record
dev.tachyonmcp.core.server.session.SessionEvent.ResponseEvent
- Record Components:
sessionId- the session this event belongs torequestId- the request identifierresultJson- the JSON-encoded result payloadtimestamp- the event timestamp (epoch millis)sseEventId- the SSE event id for replaystreamKey- the SSE stream key, ornullfor the general-purpose stream
- All Implemented Interfaces:
SessionEvent
- Enclosing interface:
SessionEvent
public static record SessionEvent.ResponseEvent(String sessionId, RequestId requestId, String resultJson, long timestamp, long sseEventId, @Nullable String streamKey)
extends Record
implements SessionEvent
A response sent to the client.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.tachyonmcp.core.server.session.SessionEvent
SessionEvent.CancelEvent, SessionEvent.NotificationEvent, SessionEvent.OutboundRequestEvent, SessionEvent.RequestEvent, SessionEvent.ResponseEvent -
Constructor Summary
ConstructorsConstructorDescriptionResponseEvent(String sessionId, RequestId requestId, String resultJson, long timestamp, long sseEventId, @Nullable String streamKey) Creates an instance of aResponseEventrecord class. -
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.Returns the value of therequestIdrecord component.Returns the value of theresultJsonrecord component.Returns the value of thesessionIdrecord component.longReturns the value of thesseEventIdrecord component.@Nullable StringReturns the value of thestreamKeyrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResponseEvent
public ResponseEvent(String sessionId, RequestId requestId, String resultJson, long timestamp, long sseEventId, @Nullable String streamKey) Creates an instance of aResponseEventrecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentrequestId- the value for therequestIdrecord componentresultJson- the value for theresultJsonrecord componenttimestamp- the value for thetimestamprecord componentsseEventId- the value for thesseEventIdrecord componentstreamKey- the value for thestreamKeyrecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sessionId
Returns the value of thesessionIdrecord component.- Specified by:
sessionIdin interfaceSessionEvent- Returns:
- the value of the
sessionIdrecord component
-
requestId
Returns the value of therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-
resultJson
Returns the value of theresultJsonrecord component.- Returns:
- the value of the
resultJsonrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceSessionEvent- Returns:
- the value of the
timestamprecord component
-
sseEventId
public long sseEventId()Returns the value of thesseEventIdrecord component.- Specified by:
sseEventIdin interfaceSessionEvent- Returns:
- the value of the
sseEventIdrecord component
-
streamKey
Returns the value of thestreamKeyrecord component.- Specified by:
streamKeyin interfaceSessionEvent- Returns:
- the value of the
streamKeyrecord component
-