Class DistributableWebSession

java.lang.Object
org.wildfly.clustering.spring.web.DistributableWebSession
All Implemented Interfaces:
AutoCloseable, org.springframework.web.server.WebSession, SpringWebSession

public class DistributableWebSession extends Object implements SpringWebSession
Author:
Paul Ferraro
  • Constructor Details

    • DistributableWebSession

      public DistributableWebSession(org.wildfly.clustering.session.SessionManager<Void> manager, org.wildfly.clustering.session.Session<Void> session, org.wildfly.clustering.cache.batch.SuspendedBatch batch)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.springframework.web.server.WebSession
    • getAttributes

      public Map<String,Object> getAttributes()
      Specified by:
      getAttributes in interface org.springframework.web.server.WebSession
    • start

      public void start()
      Specified by:
      start in interface org.springframework.web.server.WebSession
    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface org.springframework.web.server.WebSession
    • isNew

      public boolean isNew()
      Description copied from interface: SpringWebSession
      Indicates whether this session was created during the current request.
      Specified by:
      isNew in interface SpringWebSession
      Returns:
      true, if this session was newly created, false otherwise.
    • isValid

      public boolean isValid()
      Description copied from interface: SpringWebSession
      Indicates whether this session was invalidated by the current request.
      Specified by:
      isValid in interface SpringWebSession
      Returns:
      true, if this session was invalidated, false otherwise.
    • changeSessionId

      public reactor.core.publisher.Mono<Void> changeSessionId()
      Specified by:
      changeSessionId in interface org.springframework.web.server.WebSession
    • invalidate

      public reactor.core.publisher.Mono<Void> invalidate()
      Specified by:
      invalidate in interface org.springframework.web.server.WebSession
    • close

      public void close()
      Description copied from interface: SpringWebSession
      To be invoked by WebSession.save().
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SpringWebSession
    • save

      public reactor.core.publisher.Mono<Void> save()
      Specified by:
      save in interface org.springframework.web.server.WebSession
    • isExpired

      public boolean isExpired()
      Specified by:
      isExpired in interface org.springframework.web.server.WebSession
    • getCreationTime

      public Instant getCreationTime()
      Specified by:
      getCreationTime in interface org.springframework.web.server.WebSession
    • getLastAccessTime

      public Instant getLastAccessTime()
      Specified by:
      getLastAccessTime in interface org.springframework.web.server.WebSession
    • setMaxIdleTime

      public void setMaxIdleTime(Duration maxIdleTime)
      Specified by:
      setMaxIdleTime in interface org.springframework.web.server.WebSession
    • getMaxIdleTime

      public Duration getMaxIdleTime()
      Specified by:
      getMaxIdleTime in interface org.springframework.web.server.WebSession