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 SessionProperties
empty()
Creates an empty SessionProperties object.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxIdleTime
record component.Returns the value of themaxSessionTime
record component.Returns the value of theproperties
record component.final String
toString()
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 theproperties
record component.- Returns:
- the value of the
properties
record component
-
maxSessionTime
Returns the value of themaxSessionTime
record component.- Returns:
- the value of the
maxSessionTime
record component
-
maxIdleTime
Returns the value of themaxIdleTime
record component.- Returns:
- the value of the
maxIdleTime
record component
-