Record Class McpStoredSession
java.lang.Object
java.lang.Record
com.soklet.McpStoredSession
@Immutable
public record McpStoredSession(@NonNull String sessionId, @NonNull Class<? extends McpEndpoint> endpointClass, @NonNull Instant createdAt, @NonNull Instant lastActivityAt, @NonNull Boolean initialized, @NonNull Boolean initializedNotificationReceived, @Nullable String protocolVersion, @Nullable McpClientCapabilities clientCapabilities, @Nullable McpNegotiatedCapabilities negotiatedCapabilities, @NonNull McpSessionContext sessionContext, @Nullable Instant terminatedAt, @NonNull Long version)
extends Record
Immutable stored representation of an MCP session.
- Author:
- Mark Allen
-
Constructor Summary
ConstructorsConstructorDescriptionMcpStoredSession(@NonNull String sessionId, @NonNull Class<? extends McpEndpoint> endpointClass, @NonNull Instant createdAt, @NonNull Instant lastActivityAt, @NonNull Boolean initialized, @NonNull Boolean initializedNotificationReceived, @Nullable String protocolVersion, @Nullable McpClientCapabilities clientCapabilities, @Nullable McpNegotiatedCapabilities negotiatedCapabilities, @NonNull McpSessionContext sessionContext, @Nullable Instant terminatedAt, @NonNull Long version) Creates an instance of aMcpStoredSessionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientCapabilitiesrecord component.Returns the value of thecreatedAtrecord component.@NonNull Class<? extends McpEndpoint> Returns the value of theendpointClassrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinitializedrecord component.Returns the value of theinitializedNotificationReceivedrecord component.Returns the value of thelastActivityAtrecord component.Returns the value of thenegotiatedCapabilitiesrecord component.Returns the value of theprotocolVersionrecord component.Returns the value of thesessionContextrecord component.Returns the value of thesessionIdrecord component.Returns the value of theterminatedAtrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
McpStoredSession
public McpStoredSession(@NonNull String sessionId, @NonNull Class<? extends McpEndpoint> endpointClass, @NonNull Instant createdAt, @NonNull Instant lastActivityAt, @NonNull Boolean initialized, @NonNull Boolean initializedNotificationReceived, @Nullable String protocolVersion, @Nullable McpClientCapabilities clientCapabilities, @Nullable McpNegotiatedCapabilities negotiatedCapabilities, @NonNull McpSessionContext sessionContext, @Nullable Instant terminatedAt, @NonNull Long version) Creates an instance of aMcpStoredSessionrecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentendpointClass- the value for theendpointClassrecord componentcreatedAt- the value for thecreatedAtrecord componentlastActivityAt- the value for thelastActivityAtrecord componentinitialized- the value for theinitializedrecord componentinitializedNotificationReceived- the value for theinitializedNotificationReceivedrecord componentprotocolVersion- the value for theprotocolVersionrecord componentclientCapabilities- the value for theclientCapabilitiesrecord componentnegotiatedCapabilities- the value for thenegotiatedCapabilitiesrecord componentsessionContext- the value for thesessionContextrecord componentterminatedAt- the value for theterminatedAtrecord componentversion- the value for theversionrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
sessionId
-
endpointClass
Returns the value of theendpointClassrecord component.- Returns:
- the value of the
endpointClassrecord component
-
createdAt
-
lastActivityAt
Returns the value of thelastActivityAtrecord component.- Returns:
- the value of the
lastActivityAtrecord component
-
initialized
Returns the value of theinitializedrecord component.- Returns:
- the value of the
initializedrecord component
-
initializedNotificationReceived
Returns the value of theinitializedNotificationReceivedrecord component.- Returns:
- the value of the
initializedNotificationReceivedrecord component
-
protocolVersion
Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
clientCapabilities
Returns the value of theclientCapabilitiesrecord component.- Returns:
- the value of the
clientCapabilitiesrecord component
-
negotiatedCapabilities
Returns the value of thenegotiatedCapabilitiesrecord component.- Returns:
- the value of the
negotiatedCapabilitiesrecord component
-
sessionContext
Returns the value of thesessionContextrecord component.- Returns:
- the value of the
sessionContextrecord component
-
terminatedAt
Returns the value of theterminatedAtrecord component.- Returns:
- the value of the
terminatedAtrecord component
-
version
-