app2.client
Class NetworkCom

java.lang.Object
  extended byapp2.client.GASPClient
      extended byapp2.client.NetworkCom
All Implemented Interfaces:
java.lang.Runnable

public class NetworkCom
extends GASPClient
implements java.lang.Runnable

Author:
Maxime Wozny ,Alexandre Garcé, Moez Habib Thameur, Franck CARON, Romain PELLERIN

Field Summary
static long minimalRequestDeltaTime
           
 
Constructor Summary
NetworkCom(IHMGasp c)
           
 
Method Summary
 void addMessageToSend(java.lang.Object o)
           
 void initCustomTypes()
           
static NewPlayer newNewPlayerMessage()
          Creation of a new event NewPlayer.
 void onDataEvent(int actorSessionID, java.util.Hashtable datas)
          Method called when a DataEvent is received from the platform.
 void onEndEvent(int actorSessionID)
          Method called when a EndEvent is received from the platform.
 void onJoinEvent(int actorSessionID, java.lang.String username)
          Method called when a JoinEvent is received from the platform.
 void onQuitEvent(int actorSessionID)
          Method called when a QuitEvent is received from the platform.
 void onStartEvent(int actorSessionID)
          Method called when a StartEvent is received from the platform.
static void release(java.lang.Object x)
          release the object which is put in parameter.
 void run()
           
 void startComThread()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minimalRequestDeltaTime

public static final long minimalRequestDeltaTime
See Also:
Constant Field Values
Constructor Detail

NetworkCom

public NetworkCom(IHMGasp c)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

startComThread

public void startComThread()

initCustomTypes

public void initCustomTypes()
Specified by:
initCustomTypes in class GASPClient

onJoinEvent

public void onJoinEvent(int actorSessionID,
                        java.lang.String username)
Description copied from class: GASPClient
Method called when a JoinEvent is received from the platform.

Specified by:
onJoinEvent in class GASPClient
Parameters:
actorSessionID -
username -

onStartEvent

public void onStartEvent(int actorSessionID)
Description copied from class: GASPClient
Method called when a StartEvent is received from the platform.

Specified by:
onStartEvent in class GASPClient
Parameters:
actorSessionID -

onEndEvent

public void onEndEvent(int actorSessionID)
Description copied from class: GASPClient
Method called when a EndEvent is received from the platform.

Specified by:
onEndEvent in class GASPClient
Parameters:
actorSessionID -

onQuitEvent

public void onQuitEvent(int actorSessionID)
Description copied from class: GASPClient
Method called when a QuitEvent is received from the platform.

Specified by:
onQuitEvent in class GASPClient
Parameters:
actorSessionID -

onDataEvent

public void onDataEvent(int actorSessionID,
                        java.util.Hashtable datas)
Description copied from class: GASPClient
Method called when a DataEvent is received from the platform.

Specified by:
onDataEvent in class GASPClient
Parameters:
actorSessionID -
datas - the hashtable of datas

newNewPlayerMessage

public static NewPlayer newNewPlayerMessage()
Creation of a new event NewPlayer. If the vector newPlayerObjects is not empty, the event is put in it, else the vector is created and the event is put in it.


release

public static void release(java.lang.Object x)
release the object which is put in parameter. Put the object in the associated vector.


addMessageToSend

public void addMessageToSend(java.lang.Object o)