/***********************************************************************

GECCO, a platform for command and control gaming

Copyright (C) 2001 Henrik Bäärnhielm, Andreas Enblom, Niklas
Hallenfur, Karl Hasselström, Henrik Hägerström, Oskar Linde, Jing Fu
Zi and Jon Åslund

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.

***********************************************************************/

package gecco.communication.messages;

/**
 *  This is the superclass for all messages to be sent when the client calls
 *  doAction()
 *
 * @author     Niklas Hallenfur
 * @created    June 27, 2001
 */

public class ActionMessage {
    /**
     *  Description of the Field
     */
    private int piecehandle;
    /**
     *  Description of the Field
     */
    private String actionhandle;
    /**
     *  Description of the Field
     */
    private long actionID;


    /**
     *  Constructor for the ActionMessage object
     *
     * @param  id  Description of Parameter
     * @param  ph  Description of Parameter
     * @param  ah  Description of Parameter
     */
    public ActionMessage(long id, int ph, String ah) {
        actionID = id;
        piecehandle = ph;
        actionhandle = new String(ah);
    }


    /**
     *  Gets the Id attribute of the ActionMessage object
     *
     * @return    The Id value
     */
    public long getId() {
        return actionID;
    }


    /**
     *  Gets the PieceHandle attribute of the ActionMessage object
     *
     * @return    The PieceHandle value
     */
    public int getPieceHandle() {
        return piecehandle;
    }


    /**
     *  Gets the ActionHandle attribute of the ActionMessage object
     *
     * @return    The ActionHandle value
     */
    public String getActionHandle() {
        return new String(actionhandle);
    }
}
