Package io.undertow.util
Class Sessions
- java.lang.Object
-
- io.undertow.util.Sessions
-
public class Sessions extends Object
Utility class for working with sessions.- Author:
- Stuart Douglas
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Session
getOrCreateSession(HttpServerExchange exchange)
Gets the active session, creating a new one if one does not existstatic Session
getSession(HttpServerExchange exchange)
Gets the active session, returning null if one is not present.
-
-
-
Method Detail
-
getSession
public static Session getSession(HttpServerExchange exchange)
Gets the active session, returning null if one is not present.- Parameters:
exchange
- The exchange- Returns:
- The session
-
getOrCreateSession
public static Session getOrCreateSession(HttpServerExchange exchange)
Gets the active session, creating a new one if one does not exist- Parameters:
exchange
- The exchange- Returns:
- The session
-
-