4A Server -
2.0
|
Class that provides cleaning of unactive sessions (basic version, not final) More...
Classes | |
class | CheckAndClean |
Class implement run() method. That method go trough list of sessions and try to find expired sessions. First kind of expiration occur in case of client unactivity second kind occur in case of lost connection with annotation client. This object detect both cases and remove session from sessions list. More... | |
Public Member Functions | |
SessionCleaner () | |
void | setSessionConfirm (long sessionId) |
Static Public Attributes | |
static final int | SECOND = 1000 |
static final int | TIMER_PERIOD_S = 60 |
Private Attributes | |
Timer | timer = null |
long | confirmPeriod |
Class that provides cleaning of unactive sessions (basic version, not final)
Class that provides cleaning of unactive sessions (basic version, not final)
Definition at line 27 of file SessionCleaner.java.
cz.vutbr.fit.knot.annotations.comet.SessionCleaner.SessionCleaner | ( | ) |
Constructor
Definition at line 41 of file SessionCleaner.java.
void cz.vutbr.fit.knot.annotations.comet.SessionCleaner.setSessionConfirm | ( | long | sessionId | ) |
Sets actual time stamp for session confirm time
sessionId | Id of session that will be update |
Definition at line 89 of file SessionCleaner.java.
|
private |
represent maximum time for confirmation of activity from client
Definition at line 32 of file SessionCleaner.java.
|
static |
miliseconds in one second constant
Definition at line 34 of file SessionCleaner.java.
|
private |
timer that execute task CheckAndClean evry time period
Definition at line 30 of file SessionCleaner.java.
|
static |
timer tick period
Definition at line 36 of file SessionCleaner.java.