Class CompositeSession<C>

Type Parameters:
C - the session context type
All Implemented Interfaces:
AutoCloseable, org.wildfly.clustering.session.ImmutableSession, org.wildfly.clustering.session.Session<C>

public class CompositeSession<C> extends CompositeImmutableSession implements org.wildfly.clustering.session.Session<C>
A session composed of attributes, metadata, and context.
Author:
Paul Ferraro
  • Constructor Details

    • CompositeSession

      public CompositeSession(String id, InvalidatableSessionMetaData metaData, SessionAttributes attributes, org.wildfly.clustering.server.util.Supplied<C> context, Supplier<C> contextFactory, org.wildfly.clustering.cache.CacheEntryRemover<String> remover)
      Creates a session composed of metadata, attributes, and context.
      Parameters:
      id - the identifier of this session
      metaData - the metadata of this session
      attributes - the attributes of this session
      context - the supplied context of this session
      contextFactory - a supplier of session context
      remover - a session remover
  • Method Details

    • getAttributes

      public SessionAttributes getAttributes()
      Specified by:
      getAttributes in interface org.wildfly.clustering.session.ImmutableSession
      Overrides:
      getAttributes in class CompositeImmutableSession
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface org.wildfly.clustering.session.ImmutableSession
      Overrides:
      isValid in class CompositeImmutableSession
    • invalidate

      public void invalidate()
      Specified by:
      invalidate in interface org.wildfly.clustering.session.Session<C>
    • getMetaData

      public org.wildfly.clustering.session.SessionMetaData getMetaData()
      Specified by:
      getMetaData in interface org.wildfly.clustering.session.ImmutableSession
      Specified by:
      getMetaData in interface org.wildfly.clustering.session.Session<C>
      Overrides:
      getMetaData in class CompositeImmutableSession
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.wildfly.clustering.session.Session<C>
    • getContext

      public C getContext()
      Specified by:
      getContext in interface org.wildfly.clustering.session.Session<C>