org.mega.gasp.platform.impl
Class SessionImpl

java.lang.Object
  extended byorg.mega.gasp.platform.impl.SessionImpl
All Implemented Interfaces:
Session

public class SessionImpl
extends java.lang.Object
implements Session

Session represent the connection of the user in the application. So it is instantiate immedialtly after the login of the user. The Session ID is used for identification of the user on a request.

Author:
PELLERIN Romain (pellerin@cnam.fr) - MEGA Project

Field Summary
private  int actorID
           
private  int actorSessionID
           
private  java.lang.String pseudo
           
private  int sessionID
           
private  long timeout
           
 
Constructor Summary
SessionImpl(int aID, long _timeout)
           
 
Method Summary
 int getActorID()
          Returns the Actor ID of the user.
 int getActorSessionID()
          Returns the ActorSession ID if the user have already choiced a game session.
 java.lang.String getPseudoName()
          Returns the current pseudo name of the user session.
 int getSessionID()
          Returns the Session ID of the Session object.
 long getTimeout()
          Returns last time infos received for the user associated with the actorSession.
 void refreshTimeout()
          Save last time infos received for the user associated with the actorSession.
 void setActorSessionID(int aSID)
          Sets the ActorSession ID after game session choose by the user.
 void setPseudoName(java.lang.String name)
          Set the current pseudo name of the user session.
 void setTimeout(long _timeout)
          Save last time infos received for the user associated with the actorSession.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionID

private int sessionID

actorID

private int actorID

actorSessionID

private int actorSessionID

pseudo

private java.lang.String pseudo

timeout

private long timeout
Constructor Detail

SessionImpl

public SessionImpl(int aID,
                   long _timeout)
Method Detail

getSessionID

public int getSessionID()
Returns the Session ID of the Session object.

Specified by:
getSessionID in interface Session
Returns:
the Session ID

getActorID

public int getActorID()
Returns the Actor ID of the user.

Specified by:
getActorID in interface Session
Returns:
the Actor ID

getActorSessionID

public int getActorSessionID()
Returns the ActorSession ID if the user have already choiced a game session.

Specified by:
getActorSessionID in interface Session
Returns:
the ActorSession ID

getPseudoName

public java.lang.String getPseudoName()
Returns the current pseudo name of the user session.

Returns:
the ActorSession ID

setActorSessionID

public void setActorSessionID(int aSID)
Sets the ActorSession ID after game session choose by the user.

Specified by:
setActorSessionID in interface Session
Parameters:
aSID - the ActorSession ID

setPseudoName

public void setPseudoName(java.lang.String name)
Set the current pseudo name of the user session.


getTimeout

public long getTimeout()
Returns last time infos received for the user associated with the actorSession.

Specified by:
getTimeout in interface Session
Returns:
long the application timeout

setTimeout

public void setTimeout(long _timeout)
Save last time infos received for the user associated with the actorSession.

Specified by:
setTimeout in interface Session

refreshTimeout

public void refreshTimeout()
Save last time infos received for the user associated with the actorSession.

Specified by:
refreshTimeout in interface Session