Class ValidSession<L>
- java.lang.Object
-
- org.wildfly.clustering.web.cache.session.ValidSession<L>
-
- All Implemented Interfaces:
AutoCloseable,ImmutableSession,Session<L>
public class ValidSession<L> extends Object implements Session<L>
Sessiondecorator whose methods throw anIllegalStateExceptionif the session is not valid.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description ValidSession(Session<L> session, Consumer<ImmutableSession> closeTask)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()SessionAttributesgetAttributes()StringgetId()LgetLocalContext()SessionMetaDatagetMetaData()voidinvalidate()booleanisValid()
-
-
-
Constructor Detail
-
ValidSession
public ValidSession(Session<L> session, Consumer<ImmutableSession> closeTask)
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceImmutableSession
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceImmutableSession
-
getLocalContext
public L getLocalContext()
- Specified by:
getLocalContextin interfaceSession<L>
-
getMetaData
public SessionMetaData getMetaData()
- Specified by:
getMetaDatain interfaceImmutableSession- Specified by:
getMetaDatain interfaceSession<L>
-
getAttributes
public SessionAttributes getAttributes()
- Specified by:
getAttributesin interfaceImmutableSession- Specified by:
getAttributesin interfaceSession<L>
-
invalidate
public void invalidate()
- Specified by:
invalidatein interfaceSession<L>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSession<L>
-
-