Class JdkMongoSessionConverter

java.lang.Object
org.springframework.session.data.mongo.AbstractMongoSessionConverter
org.springframework.session.data.mongo.JdkMongoSessionConverter
All Implemented Interfaces:
org.springframework.core.convert.converter.GenericConverter

public class JdkMongoSessionConverter extends AbstractMongoSessionConverter
AbstractMongoSessionConverter implementation using standard Java serialization.
Since:
1.2
  • Constructor Details

    • JdkMongoSessionConverter

      public JdkMongoSessionConverter(Duration maxInactiveInterval)
    • JdkMongoSessionConverter

      public JdkMongoSessionConverter(org.springframework.core.convert.converter.Converter<Object,byte[]> serializer, org.springframework.core.convert.converter.Converter<byte[],Object> deserializer, Duration maxInactiveInterval)
  • Method Details

    • getQueryForIndex

      @Nullable public org.springframework.data.mongodb.core.query.Query getQueryForIndex(String indexName, Object indexValue)
      Description copied from class: AbstractMongoSessionConverter
      Returns query to be executed to return sessions based on a particular index.
      Specified by:
      getQueryForIndex in class AbstractMongoSessionConverter
      Parameters:
      indexName - name of the index
      indexValue - value to query against
      Returns:
      built query or null if indexName is not supported
    • convert

      protected com.mongodb.DBObject convert(org.springframework.session.data.mongo.MongoSession session)
      Specified by:
      convert in class AbstractMongoSessionConverter
    • convert

      protected org.springframework.session.data.mongo.MongoSession convert(org.bson.Document sessionWrapper)
      Specified by:
      convert in class AbstractMongoSessionConverter