j4cevo
Class Information

java.lang.Object
  extended byj4cevo.Information
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Brain.InfoExt, Brain.Information, Unit.Information

public abstract class Information
extends java.lang.Object
implements java.io.Serializable

Information is used to save data. It uses standard java serialization. It is recommended to provide specialized serialization methods (use Externalizable interface) to save space in the save game. During reconstruction of the object the player is accessible via Player.getPlayer(). j4cEvo managed objects, that need to maintain their identity use this to implement the readResolve pattern.

See Also:
Player.getPlayer(), Brain.Information, Serialized Form

Constructor Summary
Information()
           
 
Method Summary
abstract  void receivedBy(Player player)
          Hook for subclasses.
 void sendTo(Player player)
          Sending information to a player allows the player to receive this information when a game is restored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Information

public Information()
Method Detail

receivedBy

public abstract void receivedBy(Player player)
Hook for subclasses. Is called by j4cEvo for every sendTo and will be replayed for a restored game. (see cevo ClientEx call) . This call is delayed until the j4cEvo managed objects are available.

Parameters:
player - the player

sendTo

public final void sendTo(Player player)
Sending information to a player allows the player to receive this information when a game is restored.(see cevo ClientEx call)

Parameters:
player - the player


generated: 20050107