com.jme3.network.message
Class ClientRegistrationMessage

java.lang.Object
  extended by com.jme3.network.AbstractMessage
      extended by com.jme3.network.message.ClientRegistrationMessage
All Implemented Interfaces:
Message

public class ClientRegistrationMessage
extends AbstractMessage

Client registration is a message that contains a unique ID. This ID is simply the current time in milliseconds, providing multiple clients will not connect to the same server within one millisecond. This is used to couple the TCP and UDP connections together into one 'Client' on the server.


Nested Class Summary
static class ClientRegistrationMessage.ClientRegistrationSerializer
          A message-specific serializer to avoid compatibility issues between versions.
 
Field Summary
static short SERIALIZER_ID
           
 
Constructor Summary
ClientRegistrationMessage()
           
 
Method Summary
 java.lang.String getGameName()
           
 long getId()
           
 int getVersion()
           
 void setGameName(java.lang.String name)
           
 void setId(long id)
           
 void setVersion(int version)
           
 java.lang.String toString()
           
 
Methods inherited from class com.jme3.network.AbstractMessage
isReliable, setReliable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERIALIZER_ID

public static final short SERIALIZER_ID
See Also:
Constant Field Values
Constructor Detail

ClientRegistrationMessage

public ClientRegistrationMessage()
Method Detail

getId

public long getId()

setId

public void setId(long id)

setGameName

public void setGameName(java.lang.String name)

getGameName

public java.lang.String getGameName()

setVersion

public void setVersion(int version)

getVersion

public int getVersion()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object