@Immutable public final class SessionHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static Enumeration<String> |
getAllAttributes(javax.servlet.http.HttpSession aSession)
Get all attribute names present in the specified session.
|
static com.helger.commons.state.EChange |
safeInvalidateSession(javax.servlet.http.HttpSession aSession)
Invalidate the session if the session is still active.
|
static javax.servlet.http.HttpSession |
safeRenewSession(javax.servlet.http.HttpServletRequest aHttpRequest)
Invalidate the session of the specified request (if any) and create a new
session.
|
@Nonnull public static com.helger.commons.state.EChange safeInvalidateSession(@Nullable javax.servlet.http.HttpSession aSession)
aSession - The session to be invalidated. May be null.EChange.CHANGED if the session was invalidated,
EChange.UNCHANGED otherwise.@Nonnull public static Enumeration<String> getAllAttributes(@Nonnull javax.servlet.http.HttpSession aSession)
aSession - The session to use. May not be null.null.@Nonnull public static javax.servlet.http.HttpSession safeRenewSession(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest)
aHttpRequest - The HTTP request to use. May not be null.HttpSession to use. Never null.Copyright © 2016–2019 Philip Helger. All rights reserved.