public class ValidSession<L> extends Object implements Session<L>
Session decorator whose methods throw an IllegalStateException if the session is not valid.| Constructor and Description |
|---|
ValidSession(Session<L> session,
Consumer<ImmutableSession> closeTask) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
SessionAttributes |
getAttributes() |
String |
getId() |
L |
getLocalContext() |
SessionMetaData |
getMetaData() |
void |
invalidate() |
boolean |
isValid() |
public ValidSession(Session<L> session, Consumer<ImmutableSession> closeTask)
public String getId()
getId in interface ImmutableSessionpublic boolean isValid()
isValid in interface ImmutableSessionpublic L getLocalContext()
getLocalContext in interface Session<L>public SessionMetaData getMetaData()
getMetaData in interface ImmutableSessiongetMetaData in interface Session<L>public SessionAttributes getAttributes()
getAttributes in interface ImmutableSessiongetAttributes in interface Session<L>public void invalidate()
invalidate in interface Session<L>public void close()
close in interface AutoCloseableclose in interface Session<L>Copyright © 2021 JBoss by Red Hat. All rights reserved.