Examples of GdlAtom


Examples of stanfordlogic.gdl.GdlAtom

        // the first element of the list should be an atom, telling us the command
        if ( ( list.getElement(0) instanceof GdlAtom ) == false )
        {
            throw new IllegalArgumentException("First element of message received in list is not an atom! Got: " + list.getElement(0) );
        }
        GdlAtom command = (GdlAtom) list.getElement(0);
       
        String matchId = list.getElement(1).toString();
       
        RequestHandler result = null;
       
        if ( command.equals("start") )
        {
            result = new StartRequestHandler(socket, header, list, matchId);
        }
        else if ( command.equals("play") )
        {
            result = new PlayRequestHandler(socket, header, list, matchId);
        }
        else if ( command.equals("stop") )
        {
            result = new StopRequestHandler(socket, header, list, matchId);
        }
        else if ( command.equals("kill") )
        {
            // FIXME: make this more secure!!!
            result = new KillRequestHandler(socket, header, list, matchId);
        }
        else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.