Record Class AbstractSessionManager.RequestedSession
java.lang.Object
java.lang.Record
org.eclipse.jetty.session.AbstractSessionManager.RequestedSession
- Record Components:
session
- TheSession
associated with the ID, which may have been invalidated or changed ID since the request was received; ornull
if no session existed matching the requested ID.sessionId
- The requested session ID.sessionIdFrom
- AString
representing the source of the session ID. Common values include:ID_FROM_COOKIE
orID_FROM_URI_PARAMETER
if there is no ID.
- Enclosing class:
AbstractSessionManager
public static record AbstractSessionManager.RequestedSession(ManagedSession session, String sessionId, String sessionIdFrom)
extends Record
Details of the requested session.
Session implementations should make an instance of this record available as a hidden (not in name set) request
attribute for the name "org.eclipse.jetty.session.AbstractSessionManager$RequestedSession"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final AbstractSessionManager.RequestedSession
-
Constructor Summary
ConstructorsConstructorDescriptionRequestedSession
(ManagedSession session, String sessionId, String sessionIdFrom) Creates an instance of aRequestedSession
record class. -
Method Summary
Modifier and TypeMethodDescriptionbyAttribute
(Attributes request) Get theRequestedSession
by attributefinal boolean
Indicates whether some other object is "equal to" this one.getAttribute
(String name) Get attributes asssociated with this requested session: `org.eclipse.jetty.session.RequestedSession` this instance. `org.eclipse.jetty.session.RequestedSession.session` thesession()
. `org.eclipse.jetty.session.RequestedSession.sessionId` thesessionId()
. `org.eclipse.jetty.session.RequestedSession.sessionIdFrom` thesessionIdFrom()
.final int
hashCode()
Returns a hash code value for this object.static boolean
isApplicableAttribute
(String name) boolean
isSessionIdFrom
(String source) Test if thisRequestedSession
ID is from a particular session sourcesession()
Returns the value of thesession
record component.Returns the value of thesessionId
record component.Returns the value of thesessionIdFrom
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NO_REQUESTED_SESSION
-
ATTRIBUTE
- See Also:
-
ID_FROM_COOKIE
- See Also:
-
ID_FROM_URI_PARAMETER
- See Also:
-
-
Constructor Details
-
RequestedSession
Creates an instance of aRequestedSession
record class.- Parameters:
session
- the value for thesession
record componentsessionId
- the value for thesessionId
record componentsessionIdFrom
- the value for thesessionIdFrom
record component
-
-
Method Details
-
byAttribute
Get theRequestedSession
by attribute- Parameters:
request
- The attributes to query- Returns:
- The found
RequestedSession
orNO_REQUESTED_SESSION
if none found. Nevernull
.
-
isApplicableAttribute
- Parameters:
name
- An attribute name- Returns:
true
if the attribute name is applicable to a requested session.- See Also:
-
getAttribute
Get attributes asssociated with this requested session:- `org.eclipse.jetty.session.RequestedSession` this instance.
- `org.eclipse.jetty.session.RequestedSession.session` the
session()
. - `org.eclipse.jetty.session.RequestedSession.sessionId` the
sessionId()
. - `org.eclipse.jetty.session.RequestedSession.sessionIdFrom` the
sessionIdFrom()
.
- Parameters:
name
- An attributed name- Returns:
- the attribute value or
null
-
isSessionIdFrom
Test if thisRequestedSession
ID is from a particular session source- Parameters:
source
- AString
representing the source of the session ID. Common values include:ID_FROM_COOKIE
orID_FROM_URI_PARAMETER
if there is no ID.- Returns:
True
iff thisRequestedSession
ID is from the source.
-
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)
. -
session
-
sessionId
-
sessionIdFrom
Returns the value of thesessionIdFrom
record component.- Returns:
- the value of the
sessionIdFrom
record component
-