de.yourinspiration.jexpresso.session.SessionStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jexpresso-session Show documentation
Show all versions of jexpresso-session Show documentation
A JExpresso middleware providing user sessions.
package de.yourinspiration.jexpresso.session;
import java.io.Serializable;
/**
* Stores session data as key value pairs.
*
* @author Marcel Härle
*
*/
public interface SessionStore {
/**
* Retrieves the value of the session data for the given name. The name must
* not be null.
*
* @param name
* the name of the session data
* @param sessionId
* the current sessionId
* @param clazz
* the class of the session data
* @return returns null
if no such name exists
*/
T get(final String name, final String sessionId, final Class clazz);
/**
* Sets value for the given name. The name must not be null.
*
* @param name
* the name for the session data
* @param value
* the value
* @param sessionId
* the current sessionId
*/
void set(final String name, final Serializable value, final String sessionId);
/**
* Get the current count of the existing sessions.
*
* @return the count of the existing sessions
*/
long size();
/**
* Deletes all sessions and data.
*/
void clear();
/**
* Deletes all session data for the given sessionId.
*
* @param sessionId
* the sessionId
*/
void clear(final String sessionId);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy