org.pilotix.common
Class Information

java.lang.Object
  extended by org.pilotix.common.Information
All Implemented Interfaces:
Transferable

public class Information
extends java.lang.Object
implements Transferable

Classe servant à véhiculer diverses informations entre le client et le serveur.


Field Summary
static byte AREA_ID
           | Octet 0 | Octet 1 | Octet 2 | Octet 3-3+n | | 1 Octet | 1 Octet | 1 Octet | 1 Octet | | Flag INFO |Flag AreaID|StringLength| Char 0-n |
static byte DECONNECT
           | Octet 0 | Octet 1 | | 1 Octet | 1 Octet | | Flag INFO |flag Deconnect|
static byte OWN_SHIP_ID
           | Octet 0 | Octet 1 | Octet 2 | | 1 Octet | 1 Octet | 1 Octet | |Flag INFO|Flag OwnShipId| id |
static byte SHIP_NAME
           | Octet 0 | Octet 1 | Octet 2 | Octet 3 | Octet 4-4+n | | 1 Octet | 1 Octet | 1 Octet | 1 Octet | 1 Octet | | Flag INFO |FlagShipName| ShipId |StringLength| Char 0-n |
 
Fields inherited from interface org.pilotix.common.Transferable
AREA, BALL, COMMAND, INFO, SHIP
 
Constructor Summary
Information()
           
 
Method Summary
 java.lang.String getAreaId()
           
 int getOwnShipId()
           
 int getShipId()
           
 java.lang.String getShipName()
           
 int getType()
           
 void read(MessageHandler mh)
          Met à jour l'objet à partir d'une chaîne d'octets recupéré via un messageHandler
 void setAreaId(java.lang.String anAreaId)
           
 void setCode(int aCode)
           
 void setDeconnected()
           
 void setOwnShipId(int anId)
           
 void setShipId(int shipId)
           
 void setShipName(int aShipId, java.lang.String aShipName)
           
 void setShipName(java.lang.String shipName)
           
 void setType(int type)
           
 void write(MessageHandler mh)
          envoie des octets représentant l'objet par le bié d'un messageHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OWN_SHIP_ID

public static final byte OWN_SHIP_ID
 | Octet 0 |    Octet 1   | Octet 2 |
 | 1 Octet |    1 Octet   | 1 Octet |
 |Flag INFO|Flag OwnShipId|   id    |
 

See Also:
Constant Field Values

AREA_ID

public static final byte AREA_ID
 |  Octet 0  |  Octet 1  |  Octet  2  |  Octet  3-3+n |
 |  1 Octet  |  1 Octet  |  1 Octet   |     1 Octet   |   
 | Flag INFO |Flag AreaID|StringLength|    Char 0-n   |
 

See Also:
Constant Field Values

SHIP_NAME

public static final byte SHIP_NAME
 |  Octet 0  |  Octet  1  |  Octet  2  |  Octet  3  |  Octet  4-4+n |
 |  1 Octet  |  1  Octet  |  1 Octet   |  1 Octet   |     1 Octet   |   
 | Flag INFO |FlagShipName|   ShipId   |StringLength|    Char 0-n   |
 

See Also:
Constant Field Values

DECONNECT

public static final byte DECONNECT
 |  Octet 0  |    Octet 1   |
 |  1 Octet  |    1 Octet   |   
 | Flag INFO |flag Deconnect|
 

See Also:
Constant Field Values
Constructor Detail

Information

public Information()
Method Detail

setCode

public void setCode(int aCode)

setOwnShipId

public void setOwnShipId(int anId)

setAreaId

public void setAreaId(java.lang.String anAreaId)

setShipName

public void setShipName(int aShipId,
                        java.lang.String aShipName)

setDeconnected

public void setDeconnected()

read

public void read(MessageHandler mh)
          throws java.lang.Exception
Description copied from interface: Transferable
Met à jour l'objet à partir d'une chaîne d'octets recupéré via un messageHandler

Specified by:
read in interface Transferable
Throws:
java.lang.Exception

write

public void write(MessageHandler mh)
           throws java.lang.Exception
Description copied from interface: Transferable
envoie des octets représentant l'objet par le bié d'un messageHandler

Specified by:
write in interface Transferable
Throws:
java.lang.Exception

getShipId

public int getShipId()
Returns:
Returns the shipId.

setShipId

public void setShipId(int shipId)
Parameters:
shipId - The shipId to set.

getShipName

public java.lang.String getShipName()
Returns:
Returns the shipName.

setShipName

public void setShipName(java.lang.String shipName)
Parameters:
shipName - The shipName to set.

getType

public int getType()
Returns:
Returns the type.

setType

public void setType(int type)
Parameters:
type - The type to set.

getAreaId

public java.lang.String getAreaId()
Returns:
Returns the areaId.

getOwnShipId

public int getOwnShipId()
Returns:
Returns the ownShipId.


artefarita.com/pilotix Pilotix 2003-2013 - Stilisto : G.C.