org.eclipse.palamedes.gdl.connection
Class PlayerProxy

java.lang.Object
  extended by org.eclipse.palamedes.gdl.connection.NanoHTTPD
      extended by org.eclipse.palamedes.gdl.connection.PlayerProxy

public class PlayerProxy
extends NanoHTTPD


Field Summary
 
Fields inherited from class org.eclipse.palamedes.gdl.connection.NanoHTTPD
MIME_DEFAULT_BINARY, MIME_HTML, MIME_PLAINTEXT, myFileDir, server_thread
 
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 org.eclipse.palamedes.gdl.connection.NanoHTTPD
serveFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerProxy

public PlayerProxy(int port,
                   java.lang.String[] hosts,
                   int[] ports)
            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

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 decoded
parms - Parsed, percent decoded parameters from URI and, in case of POST, data.
Returns:
HTTP response, see class Response for details