org.eclipse.palamedes.gdl.connection
Class PlayerProxy
java.lang.Object
org.eclipse.palamedes.gdl.connection.NanoHTTPD
org.eclipse.palamedes.gdl.connection.PlayerProxy
public class PlayerProxy
- extends NanoHTTPD
Constructor Summary |
PlayerProxy(int port,
java.lang.String[] hosts,
int[] ports)
|
Method Summary |
static void |
main(java.lang.String[] args)
Starts the game players and waits for messages from the game master
Command line options: [port] |
static void |
printUsage()
|
Response |
serve(java.lang.String uri,
java.lang.String method,
java.util.Properties header,
java.util.Properties parms,
java.lang.String data)
Override this to customize the server. |
void |
waitForExit()
Wait for server thread to exit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlayerProxy
public PlayerProxy(int port,
java.lang.String[] hosts,
int[] ports)
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
- Starts the game players and waits for messages from the game master
Command line options: [port]
printUsage
public static final void printUsage()
waitForExit
public void waitForExit()
- Wait for server thread to exit
serve
public Response serve(java.lang.String uri,
java.lang.String method,
java.util.Properties header,
java.util.Properties parms,
java.lang.String data)
- Description copied from class:
NanoHTTPD
- Override this to customize the server.
(By default, this delegates to serveFile() and allows directory listing.)
- Overrides:
serve
in class NanoHTTPD
- Parameters:
uri
- Percent-decoded URI without parameters, for example
"/index.cgi"method
- "GET", "POST" etc.header
- Header entries, percent decodedparms
- Parsed, percent decoded parameters from URI and, in case of
POST, data.
- Returns:
- HTTP response, see class Response for details