- All Implemented Interfaces:
Runnable
public class SingleThreadConnection
extends Object
implements Runnable
The Single Thread Connection encapsulates an ongoing connection between a client and a server
-
Constructor Summary
Constructors
-
Method Summary
com.google.gson.JsonObject
Takes in a
Command and executes it.
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Details
-
executeCommand
public com.google.gson.JsonObject executeCommand(Command c)
Takes in a
Command and executes it. Returning the resulting
JsonObject
- Parameters:
c - the Command being executed
- Returns:
- the result of the command execution
-
run
public void run()
- Specified by:
run in interface Runnable