Record Class SessionEvent.RequestEvent
java.lang.Object
java.lang.Record
dev.tachyonmcp.core.server.session.SessionEvent.RequestEvent
- Record Components:
sessionId- the session this event belongs torequestId- the request identifiermethod- the method nameparamsJson- the JSON-encoded parameters, ornulltimestamp- the event timestamp (epoch millis)
- All Implemented Interfaces:
SessionEvent
- Enclosing interface:
SessionEvent
public static record SessionEvent.RequestEvent(String sessionId, RequestId requestId, String method, @Nullable String paramsJson, long timestamp)
extends Record
implements SessionEvent
An inbound request from 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
ConstructorsConstructorDescriptionRequestEvent(String sessionId, RequestId requestId, String method, @Nullable String paramsJson, long timestamp) Creates an instance of aRequestEventrecord 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.method()Returns the value of themethodrecord component.@Nullable StringReturns the value of theparamsJsonrecord component.Returns the value of therequestIdrecord component.Returns the value of thesessionIdrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.tachyonmcp.core.server.session.SessionEvent
sseEventId, streamKey
-
Constructor Details
-
RequestEvent
public RequestEvent(String sessionId, RequestId requestId, String method, @Nullable String paramsJson, long timestamp) Creates an instance of aRequestEventrecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentrequestId- the value for therequestIdrecord componentmethod- the value for themethodrecord componentparamsJson- the value for theparamsJsonrecord componenttimestamp- the value for thetimestamprecord 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
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
paramsJson
Returns the value of theparamsJsonrecord component.- Returns:
- the value of the
paramsJsonrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceSessionEvent- Returns:
- the value of the
timestamprecord component
-