cz.cuni.pogamut.Parser
Class RemoteParser

java.lang.Object
  extended by cz.cuni.pogamut.Parser.RemoteParser

public class RemoteParser
extends java.lang.Object

Class which connects to GameBots and awaits new clients. =================================== RemoteParser for Pogamut 2 Platform =================================== RemoteParser is meant to save the network traffic between GameBot and Client. It's standing between GameBot and the Client (agent) - can be seen as the mediator. It's doing two things: 1) parse text messages from GameBot 1.a) receive and parse text message from GameBot 1.b) creates equivalent Java objects (class MessageObject) 1.c) applies delta compression 1.d) sends delta message to the Client (agent) 2) sending messages from Client to the GameBot To start the remote parser you need to specify the url of the GameBots. You may optionaly specify the port where the parser is accepting the incoming connections from Clients. Default port for Clients (agents) is 4000. ------ Usage: ------ java -cp path_to_dir_with_cz_dir cz.cuni.pogamut.Parser.RemoteParser address_of_gamebots [port_where_to_listen] Example: java -cp . cz.cuni.pogamut.Parser.RemoteParser abc.university.com This will start the parser assuming that at computer abc.university.com is running UT2004 with GameBots and will listen on the port "+RemoteParser.DEFAULT_PORT+" awaiting Clients (agents). java -cp . cz.cuni.pogamut.Parser.RemoteParser computer.university.com 4321 This will start the parser assuming that at computer abc.university.com is running UT2004 with GameBots and will listen on the port 4321 awaiting Clients (agents).


Field Summary
static int DEFAULT_PORT
           
 java.net.URI gbUri
           
static java.util.logging.Logger log
           
private  RemoteParserServer server
           
 int serverPort
           
private  boolean serverSocketInitialized
           
private  boolean serverStarted
           
private  java.lang.Thread serverThread
           
 
Constructor Summary
RemoteParser(java.lang.String url)
           
RemoteParser(java.lang.String url, int port)
           
 
Method Summary
 boolean checkGameBot()
           
static void initLogger()
           
 boolean initServer()
           
static void main(java.lang.String[] args)
           
static void printHelp()
           
 boolean startServer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

gbUri

public final java.net.URI gbUri

serverPort

public final int serverPort

serverSocketInitialized

private boolean serverSocketInitialized

server

private RemoteParserServer server

serverStarted

private boolean serverStarted

serverThread

private java.lang.Thread serverThread

log

public static java.util.logging.Logger log
Constructor Detail

RemoteParser

public RemoteParser(java.lang.String url)
             throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

RemoteParser

public RemoteParser(java.lang.String url,
                    int port)
             throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException
Method Detail

checkGameBot

public boolean checkGameBot()

initServer

public boolean initServer()

startServer

public boolean startServer()

printHelp

public static void printHelp()

initLogger

public static void initLogger()

main

public static void main(java.lang.String[] args)