TreeFrogFramework  1.18
Public Member Functions | Static Public Member Functions | List of all members
TSessionStore Class Referenceabstract

#include <tsessionstore.h>

Inheritance diagram for TSessionStore:
Inheritance graph
[legend]

Public Member Functions

 TSessionStore ()
 
virtual ~TSessionStore ()
 
virtual TSession find (const QByteArray &id)=0
 
virtual bool store (TSession &sesion)=0
 
virtual bool remove (const QByteArray &id)=0
 
virtual int gc (const QDateTime &expire)=0
 

Static Public Member Functions

static int lifeTimeSecs ()
 

Detailed Description

The TSessionStore is an abstract class that stores HTTP sessions.

Constructor & Destructor Documentation

TSessionStore::TSessionStore ( )
inline
virtual TSessionStore::~TSessionStore ( )
inlinevirtual

Member Function Documentation

TSession TSessionStore::find ( const QByteArray &  id)
pure virtual

Returns the session which has the ID id and is newer than or equal to the expiration datetime in the session store.

If the store contains no such session, the function returns a empty session. This function should be called from any reimplementations of find().

Implemented in TSessionMongoStore, and TSessionRedisStore.

virtual int TSessionStore::gc ( const QDateTime &  expire)
pure virtual

Implemented in TSessionMongoStore, and TSessionRedisStore.

int TSessionStore::lifeTimeSecs ( )
static
bool TSessionStore::remove ( const QByteArray &  id)
pure virtual

Removes all sessions older than the expiration datetime.

Removes the session with the ID id.

This function should be called from any reimplementations of remove().

Implemented in TSessionMongoStore, and TSessionRedisStore.

bool TSessionStore::store ( TSession sesion)
pure virtual

Stores the session in the session store.

This function should be called from any reimplementations of store().

Implemented in TSessionMongoStore, and TSessionRedisStore.


The documentation for this class was generated from the following files: