Package net.rwx.padlock
Class PadlockSession
- java.lang.Object
-
- net.rwx.padlock.PadlockSession
-
- All Implemented Interfaces:
jakarta.servlet.http.HttpSession
@RequestScoped public class PadlockSession extends Object implements jakarta.servlet.http.HttpSession
Provide a way to bind objects across more than one request. Object use serialization to be added into session token.PadlockSessioninherit fromHttpSessionto keep same method signatures.- Author:
- Arnaud Fonce
- See Also:
HttpSession
-
-
Constructor Summary
Constructors Constructor Description PadlockSession()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAttribute(String name)<T> TgetAttribute(String name, Class<T> type)Enumeration<String>getAttributeNames()longgetCreationTime()StringgetId()longgetLastAccessedTime()intgetMaxInactiveInterval()jakarta.servlet.ServletContextgetServletContext()voidinvalidate()booleanisAuthenticated()booleanisEmpty()booleanisNew()booleanisValid()voidremoveAttribute(String name)voidsetAttribute(String name, Object value)voidsetAuthenticated(boolean authenticated)voidsetMaxInactiveInterval(int i)
-
-
-
Method Detail
-
setAuthenticated
public void setAuthenticated(boolean authenticated)
-
isAuthenticated
public boolean isAuthenticated()
-
isEmpty
public boolean isEmpty()
-
isValid
public boolean isValid()
-
setAttribute
public void setAttribute(String name, Object value)
- Specified by:
setAttributein interfacejakarta.servlet.http.HttpSession
-
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTimein interfacejakarta.servlet.http.HttpSession
-
getId
public String getId()
- Specified by:
getIdin interfacejakarta.servlet.http.HttpSession
-
getLastAccessedTime
public long getLastAccessedTime()
- Specified by:
getLastAccessedTimein interfacejakarta.servlet.http.HttpSession
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()
- Specified by:
getServletContextin interfacejakarta.servlet.http.HttpSession
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int i)
- Specified by:
setMaxInactiveIntervalin interfacejakarta.servlet.http.HttpSession
-
getMaxInactiveInterval
public int getMaxInactiveInterval()
- Specified by:
getMaxInactiveIntervalin interfacejakarta.servlet.http.HttpSession
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttributein interfacejakarta.servlet.http.HttpSession
-
getAttributeNames
public Enumeration<String> getAttributeNames()
- Specified by:
getAttributeNamesin interfacejakarta.servlet.http.HttpSession
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttributein interfacejakarta.servlet.http.HttpSession
-
invalidate
public void invalidate()
- Specified by:
invalidatein interfacejakarta.servlet.http.HttpSession
-
isNew
public boolean isNew()
- Specified by:
isNewin interfacejakarta.servlet.http.HttpSession
-
-