Package io.undertow.util
Class Sessions
java.lang.Object
io.undertow.util.Sessions
Utility class for working with sessions.
- Author:
- Stuart Douglas
-
Method Summary
Modifier and TypeMethodDescriptionstatic SessiongetOrCreateSession(HttpServerExchange exchange) Gets the active session, creating a new one if one does not existstatic SessiongetSession(HttpServerExchange exchange) Gets the active session, returning null if one is not present.
-
Method Details
-
getSession
Gets the active session, returning null if one is not present.- Parameters:
exchange- The exchange- Returns:
- The session
-
getOrCreateSession
Gets the active session, creating a new one if one does not exist- Parameters:
exchange- The exchange- Returns:
- The session
-