Class DistributableSession
java.lang.Object
org.wildfly.clustering.spring.session.DistributableSession
- All Implemented Interfaces:
AutoCloseable,org.springframework.session.Session,SpringSession
Spring Session implementation that delegates to a
Session instance.- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionDistributableSession(org.wildfly.clustering.session.SessionManager<Void> manager, org.wildfly.clustering.session.Session<Void> session, org.wildfly.clustering.cache.batch.SuspendedBatch batch, UserConfiguration indexing, BiConsumer<org.wildfly.clustering.session.ImmutableSession, BiFunction<Object, org.springframework.session.Session, org.springframework.context.ApplicationEvent>> destroyAction) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()To be invoked bySessionRepository.save(Session).<T> TgetAttribute(String name) getId()voidInvalidates this session.booleanbooleanisNew()Indicates whether this session was created during the current request.voidremoveAttribute(String name) voidsetAttribute(String name, Object value) voidsetLastAccessedTime(Instant instant) voidsetMaxInactiveInterval(Duration duration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.session.Session
getAttributeOrDefault, getRequiredAttribute
-
Constructor Details
-
DistributableSession
public DistributableSession(org.wildfly.clustering.session.SessionManager<Void> manager, org.wildfly.clustering.session.Session<Void> session, org.wildfly.clustering.cache.batch.SuspendedBatch batch, UserConfiguration indexing, BiConsumer<org.wildfly.clustering.session.ImmutableSession, BiFunction<Object, org.springframework.session.Session, org.springframework.context.ApplicationEvent>> destroyAction)
-
-
Method Details
-
changeSessionId
- Specified by:
changeSessionIdin interfaceorg.springframework.session.Session
-
getAttribute
- Specified by:
getAttributein interfaceorg.springframework.session.Session
-
getAttributeNames
-
getCreationTime
- Specified by:
getCreationTimein interfaceorg.springframework.session.Session
-
getId
- Specified by:
getIdin interfaceorg.springframework.session.Session
-
getLastAccessedTime
- Specified by:
getLastAccessedTimein interfaceorg.springframework.session.Session
-
getMaxInactiveInterval
- Specified by:
getMaxInactiveIntervalin interfaceorg.springframework.session.Session
-
isExpired
public boolean isExpired()- Specified by:
isExpiredin interfaceorg.springframework.session.Session
-
removeAttribute
- Specified by:
removeAttributein interfaceorg.springframework.session.Session
-
setAttribute
-
setLastAccessedTime
- Specified by:
setLastAccessedTimein interfaceorg.springframework.session.Session
-
setMaxInactiveInterval
- Specified by:
setMaxInactiveIntervalin interfaceorg.springframework.session.Session
-
isNew
public boolean isNew()Description copied from interface:SpringSessionIndicates whether this session was created during the current request.- Specified by:
isNewin interfaceSpringSession- Returns:
- true, if this session was newly created, false otherwise.
-
invalidate
public void invalidate()Description copied from interface:SpringSessionInvalidates this session.- Specified by:
invalidatein interfaceSpringSession
-
close
public void close()Description copied from interface:SpringSessionTo be invoked bySessionRepository.save(Session).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSpringSession
-