org.starhope.vergil.net
Class AppianGWTClient

java.lang.Object
  extended by org.starhope.vergil.net.AppianGWTClient
All Implemented Interfaces:
AppianClient

public class AppianGWTClient
extends Object
implements AppianClient

Author:
brpocock@star-hope.org

Field Summary
(package private)  VergilAppiusGWTCommunicator communicator
          WRITEME: Document this brpocock@star-hope.org
private  boolean isBusy
          whether this is busy doing something
private  long lastInputTime
          the last time something cool happened
(package private)  UserRecord userRecord
          The user connected through this client; Field only ever set to null: org.starhope.vergil.net.AppianGWTClient.userRecord
 
Constructor Summary
AppianGWTClient()
           
 
Method Summary
 void close()
          Close the server connection and terminate the game
 void connect(String serverAddress, int serverPort)
          Connect to the server based upon a hostname and port
 long getIdleTime()
           
 String getName()
          WRITEME: Document this method brpocock@star-hope.org
 boolean isBusy()
           
private  void logOut()
          WRITEME: Document this method brpocock@star-hope.org
 void send(String string)
          WRITEME: Document this method brpocock@star-hope.org
 void sendResponse(com.google.gwt.json.client.JSONObject ret)
          WRITEME: Document this method brpocock@star-hope.org
 void setBusyState(boolean b)
          WRITEME: Document this method brpocock@star-hope.org
 void setLastInputTime(long thatTime)
          WRITEME: Document this method brpocock@star-hope.org
 void tick(long currentTime, long deltaTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.starhope.vergil.net.AppianClient
toString
 

Field Detail

userRecord

UserRecord userRecord
The user connected through this client; Field only ever set to null: org.starhope.vergil.net.AppianGWTClient.userRecord


communicator

VergilAppiusGWTCommunicator communicator
WRITEME: Document this brpocock@star-hope.org


isBusy

private boolean isBusy
whether this is busy doing something


lastInputTime

private long lastInputTime
the last time something cool happened

Constructor Detail

AppianGWTClient

public AppianGWTClient()
Method Detail

close

public void close()
Description copied from interface: AppianClient
Close the server connection and terminate the game

Specified by:
close in interface AppianClient
See Also:
AppianClient.close()

connect

public void connect(String serverAddress,
                    int serverPort)
             throws UnknownHostException,
                    IOException,
                    ServerDisconnectedException
Description copied from interface: AppianClient
Connect to the server based upon a hostname and port

Specified by:
connect in interface AppianClient
Parameters:
serverAddress - hostname or IP address of the server
serverPort - port number on the server
Throws:
UnknownHostException - If the hostname can't be interpreted
IOException - If we're not able to connect to the server
ServerDisconnectedException - If we're disconnected
See Also:
AppianClient.connect(java.lang.String, int)

getIdleTime

public long getIdleTime()
Returns:
time since last input in milliseconds

getName

public String getName()
WRITEME: Document this method brpocock@star-hope.org

Returns:
WRITEME

isBusy

public boolean isBusy()
Returns:
true if the client is busy

logOut

private void logOut()
WRITEME: Document this method brpocock@star-hope.org


send

public void send(String string)
Description copied from interface: AppianClient
WRITEME: Document this method brpocock@star-hope.org

Specified by:
send in interface AppianClient
Parameters:
string - WRITEME
See Also:
AppianClient.send(java.lang.String)

sendResponse

public void sendResponse(com.google.gwt.json.client.JSONObject ret)
                  throws ServerDisconnectedException
WRITEME: Document this method brpocock@star-hope.org

Specified by:
sendResponse in interface AppianClient
Parameters:
ret - WRITEME
Throws:
ServerDisconnectedException - WRITEME

setBusyState

public void setBusyState(boolean b)
Description copied from interface: AppianClient
WRITEME: Document this method brpocock@star-hope.org

Specified by:
setBusyState in interface AppianClient
Parameters:
b - WRITEME
See Also:
AppianClient.setBusyState(boolean)

setLastInputTime

public void setLastInputTime(long thatTime)
Description copied from interface: AppianClient
WRITEME: Document this method brpocock@star-hope.org

Specified by:
setLastInputTime in interface AppianClient
Parameters:
thatTime - WRITEM
See Also:
CanProcessCommands.setLastInputTime(long)

tick

public void tick(long currentTime,
                 long deltaTime)
Specified by:
tick in interface AppianClient
Parameters:
currentTime - WRITEME
deltaTime - WRITEME
See Also:
AppianClient.tick(long, long)