Interface User<C,T,D,S>
- Type Parameters:
C- the user context typeT- the transient context typeD- the deployment identifier typeS- the session identifier type
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
CacheableUser<C,T, D, S>
- All Known Implementing Classes:
CachedUser, CompositeUser, DecoratedUser
Represents a user, associated with one or more sessions.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()getId()Returns the unique identifier for this user.Returns the persistent context of this user.Returns the sessions for this user.Returns the transient context of this user.voidInvalidates this user and any associated sessions.booleanisValid()Returns true unless this user was invalidated.
-
Method Details
-
getId
-
getPersistentContext
C getPersistentContext()Returns the persistent context of this user.- Returns:
- the persistent user context.
-
getTransientContext
T getTransientContext()Returns the transient context of this user.- Returns:
- the transient user context
-
getSessions
UserSessions<D,S> getSessions()Returns the sessions for this user.- Returns:
- the sessions for this user.
-
isValid
boolean isValid()Returns true unless this user was invalidated.- Returns:
- false if this user was invalidated, true otherwise.
-
invalidate
void invalidate()Invalidates this user and any associated sessions. -
close
default void close()- Specified by:
closein interfaceAutoCloseable
-