org.mega.gasp.bluetooth.miniplatform
Class ActorSession

java.lang.Object
  extended byorg.mega.gasp.bluetooth.miniplatform.ActorSession

public class ActorSession
extends java.lang.Object

ActorSession represent the link between a user (represented by instances of Session and Actor) and an ApplicationInstance. It receive and transmit all the events or message in an ApplicationInstance, in game it is the communication link between the client and the game session server.

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

Field Summary
private  int aID
           
private  int aIID
           
private  int aSID
           
private  java.util.Vector events
           
 
Constructor Summary
ActorSession(int applicationInstanceID, int actorID, int actorSessionID)
           
 
Method Summary
 int getActorID()
          Returns the Actor ID of the user.
 int getActorSessionID()
          Returns the ActorSession ID.
 int getApplicationInstanceID()
          Returns the ApplicationInstance ID linked.
 java.util.Vector getEvents()
          Return the events stored since the last request from the actor.
private  java.util.Vector purgeEvents(java.util.Vector v)
          Purge the deprecated events.
 void raiseEvent(Event e)
          Put the event on the stack of the events must be read by the actor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aIID

private int aIID

aID

private int aID

aSID

private int aSID

events

private java.util.Vector events
Constructor Detail

ActorSession

public ActorSession(int applicationInstanceID,
                    int actorID,
                    int actorSessionID)
Method Detail

getApplicationInstanceID

public int getApplicationInstanceID()
Returns the ApplicationInstance ID linked.

Returns:
the ApplicationInstance ID

getActorID

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

Returns:
the Actor ID

getActorSessionID

public int getActorSessionID()
Returns the ActorSession ID.

Returns:
the ActorSession ID.

getEvents

public java.util.Vector getEvents()
Return the events stored since the last request from the actor.

Returns:
the stack of events

raiseEvent

public void raiseEvent(Event e)
Put the event on the stack of the events must be read by the actor.

Parameters:
e - the Event

purgeEvents

private java.util.Vector purgeEvents(java.util.Vector v)
Purge the deprecated events.

Parameters:
v - the copy of the events vector