4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.comet.SessionCleaner Class Reference

Class that provides cleaning of unactive sessions (basic version, not final) More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.SessionCleaner:
Collaboration graph

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
 

Detailed Description

Class that provides cleaning of unactive sessions (basic version, not final)

Class that provides cleaning of unactive sessions (basic version, not final)

Author
Martin Petr (xpetrm05)

Definition at line 27 of file SessionCleaner.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.comet.SessionCleaner.SessionCleaner ( )

Constructor

Definition at line 41 of file SessionCleaner.java.

Member Function Documentation

void cz.vutbr.fit.knot.annotations.comet.SessionCleaner.setSessionConfirm ( long  sessionId)

Sets actual time stamp for session confirm time

Parameters
sessionIdId of session that will be update

Definition at line 89 of file SessionCleaner.java.

Here is the call graph for this function:

Member Data Documentation

long cz.vutbr.fit.knot.annotations.comet.SessionCleaner.confirmPeriod
private

represent maximum time for confirmation of activity from client

Definition at line 32 of file SessionCleaner.java.

final int cz.vutbr.fit.knot.annotations.comet.SessionCleaner.SECOND = 1000
static

miliseconds in one second constant

Definition at line 34 of file SessionCleaner.java.

Timer cz.vutbr.fit.knot.annotations.comet.SessionCleaner.timer = null
private

timer that execute task CheckAndClean evry time period

Definition at line 30 of file SessionCleaner.java.

final int cz.vutbr.fit.knot.annotations.comet.SessionCleaner.TIMER_PERIOD_S = 60
static

timer tick period

Definition at line 36 of file SessionCleaner.java.


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