com.webtair.session.artifact
Class SimpleSessionInfo

java.lang.Object
  extended by com.webtair.session.artifact.SimpleSessionInfo
All Implemented Interfaces:
SessionInfo

public class SimpleSessionInfo
extends java.lang.Object
implements SessionInfo

Class is a basic SessionInfo implementation with min needed fields.

Author:
Vaclav (Vyacheslav Yakovenko)

Constructor Summary
SimpleSessionInfo()
          Default constrctor inti SimpleSessionInfo and populate lastTimeUsed with current time value
SimpleSessionInfo(long lastTimeUsed)
          Constructor that populate SimpleSessionInfo with mentioned time value
SimpleSessionInfo(java.lang.String idUser)
          Constructor that populate SimpleSessionInfo with current time value and user id (login)
SimpleSessionInfo(java.lang.String idUser, long lastTimeUsed)
          Constructor that populate SimpleSessionInfo with mentioned time value and user id (login)
 
Method Summary
 java.lang.String getIdUser()
           
 long getLastTimeUsed()
          Return last time of session used in ms
 void setIdUser(java.lang.String idUser)
           
 void setLastTimeUsed(long lastTimeUsed)
          Set last time of session used in ms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSessionInfo

public SimpleSessionInfo()
Default constrctor inti SimpleSessionInfo and populate lastTimeUsed with current time value


SimpleSessionInfo

public SimpleSessionInfo(long lastTimeUsed)
Constructor that populate SimpleSessionInfo with mentioned time value

Parameters:
lastTimeUsed - - mentioned time value

SimpleSessionInfo

public SimpleSessionInfo(java.lang.String idUser,
                         long lastTimeUsed)
Constructor that populate SimpleSessionInfo with mentioned time value and user id (login)

Parameters:
idUser - - user id, login or nickname
lastTimeUsed - - mentioned time value

SimpleSessionInfo

public SimpleSessionInfo(java.lang.String idUser)
Constructor that populate SimpleSessionInfo with current time value and user id (login)

Parameters:
idUser - - user id, login or nickname
Method Detail

getLastTimeUsed

public long getLastTimeUsed()
Return last time of session used in ms

Specified by:
getLastTimeUsed in interface SessionInfo
Returns:
time of last use of session

setLastTimeUsed

public void setLastTimeUsed(long lastTimeUsed)
Set last time of session used in ms

Specified by:
setLastTimeUsed in interface SessionInfo
Parameters:
lastTimeUsed - - last time when session used, ms

getIdUser

public java.lang.String getIdUser()
Returns:
the idUser

setIdUser

public void setIdUser(java.lang.String idUser)
Parameters:
idUser - the idUser to set


Copyright © 2006 webtair.com . All Rights Reserved.