org.newdawn.dss.common
Interface Client

All Known Implementing Classes:
DungeonClient, IsoClient, TCPClient, TestLocals, TestTCPClient, UDPClient

public interface Client

The description of the facilities a client must provide to the server.


Method Summary
 void connectionFailed()
          Notification that the connection to the server failed
 void gameTimeStarted()
          Notification that game time has started.
 long getLastMessageTime()
          Get the time at which the last message was recieved from this client
 java.lang.String getUsername()
          Get the username of this client
 void notifyCommand(Command command)
          Send a single command to this client
 

Method Detail

notifyCommand

public void notifyCommand(Command command)
                   throws java.io.IOException
Send a single command to this client

Parameters:
command - The command to send to the client
Throws:
java.io.IOException - Indicates a failure to communicate with this client

connectionFailed

public void connectionFailed()
Notification that the connection to the server failed


gameTimeStarted

public void gameTimeStarted()
Notification that game time has started. Clients should consider the current time as 0


getUsername

public java.lang.String getUsername()
Get the username of this client

Returns:
The username of this client

getLastMessageTime

public long getLastMessageTime()
Get the time at which the last message was recieved from this client

Returns:
The time since the last message was recieved