Package org.forgerock.am.trees.model
Record Class SessionProperties
java.lang.Object
java.lang.Record
org.forgerock.am.trees.model.SessionProperties
- Record Components:
properties- A map of String properties for the session.maxSessionTime- The maximum time the session can be active.maxIdleTime- The maximum time the session can be idle.
public record SessionProperties(Map<String,String> properties, Optional<Duration> maxSessionTime, Optional<Duration> maxIdleTime)
extends Record
Represents the properties used when creating a session at the end of a journey.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SessionPropertiesempty()Creates an empty SessionProperties object.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 themaxIdleTimerecord component.Returns the value of themaxSessionTimerecord component.Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SessionProperties
public SessionProperties(Map<String, String> properties, Optional<Duration> maxSessionTime, Optional<Duration> maxIdleTime) Constructor for SessionProperties.- Parameters:
properties- A map of String properties for the session.maxSessionTime- The maximum time the session can be active.maxIdleTime- The maximum time the session can be idle.
-
SessionProperties
Constructor for SessionProperties without timeout values.- Parameters:
properties- A map of String properties for the session.
-
-
Method Details
-
empty
Creates an empty SessionProperties object. -
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). -
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
maxSessionTime
Returns the value of themaxSessionTimerecord component.- Returns:
- the value of the
maxSessionTimerecord component
-
maxIdleTime
Returns the value of themaxIdleTimerecord component.- Returns:
- the value of the
maxIdleTimerecord component
-