Package com.tnsai.channels.routing
Record Class SessionRegistry.ChannelSession
java.lang.Object
java.lang.Record
com.tnsai.channels.routing.SessionRegistry.ChannelSession
- Enclosing class:
SessionRegistry
public static record SessionRegistry.ChannelSession(String sessionKey, String channelId, String conversationId, Instant createdAt, Instant lastActive)
extends Record
Represents an active channel session.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechannelIdrecord component.Returns the value of theconversationIdrecord component.Returns the value of thecreatedAtrecord 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 thelastActiverecord component.Returns the value of thesessionKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChannelSession
public ChannelSession(String sessionKey, String channelId, String conversationId, Instant createdAt, Instant lastActive) Creates an instance of aChannelSessionrecord class.- Parameters:
sessionKey- the value for thesessionKeyrecord componentchannelId- the value for thechannelIdrecord componentconversationId- the value for theconversationIdrecord componentcreatedAt- the value for thecreatedAtrecord componentlastActive- the value for thelastActiverecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
sessionKey
Returns the value of thesessionKeyrecord component.- Returns:
- the value of the
sessionKeyrecord component
-
channelId
Returns the value of thechannelIdrecord component.- Returns:
- the value of the
channelIdrecord component
-
conversationId
Returns the value of theconversationIdrecord component.- Returns:
- the value of the
conversationIdrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
lastActive
Returns the value of thelastActiverecord component.- Returns:
- the value of the
lastActiverecord component
-