mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-05-29 13:22:00 +00:00
Update SessionsInterface.java
This commit is contained in:
parent
5011b5c8ad
commit
6529382d93
@ -2,19 +2,31 @@ package stirling.software.SPDF.config.interfaces;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import stirling.software.SPDF.config.anonymus.session.AnonymusSessionInfo;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
public interface SessionsInterface {
|
public interface SessionsInterface {
|
||||||
|
|
||||||
default boolean isSessionValid(String sessionId) {
|
boolean isSessionValid(String sessionId);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isOldestNonExpiredSession(String sessionId);
|
boolean isOldestNonExpiredSession(String sessionId);
|
||||||
|
|
||||||
void updateSessionLastRequest(String sessionId);
|
void updateSessionLastRequest(String sessionId);
|
||||||
|
|
||||||
Collection<AnonymusSessionInfo> getAllSessions();
|
Collection<SessionsModelInterface> getAllSessions();
|
||||||
|
|
||||||
Collection<AnonymusSessionInfo> getAllNonExpiredSessions();
|
Collection<SessionsModelInterface> getAllNonExpiredSessions();
|
||||||
|
|
||||||
|
Collection<SessionsModelInterface> getAllNonExpiredSessionsBySessionId(String sessionId);
|
||||||
|
|
||||||
|
void registerSession(HttpSession session);
|
||||||
|
|
||||||
|
void removeSession(HttpSession session);
|
||||||
|
|
||||||
|
default int getMaxUserSessions() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
default int getMaxApplicationSessions() {
|
||||||
|
return 10 * getMaxUserSessions();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user