<html>
<xmp>
/**
 * Title: GPS Simulator
 * Copyright: Copyright (c) 2002
 * Company:   University of Oregon Computer Science Dept.
 *
 * @author Jason Prideaux
 * @version 1.0
 *
 */

package transport.protocol;

import java.io.*;


/* ====================================================================== */
/** This class represents a Multicast message.  This message is sent by
 *  agents to the simulator, the simulator then sends the message to all
 *  agents that are with within range and certain number of hops.
 *
 */
public class MulticastMessage extends P2PMessage implements Serializable{

	/** The string content of this Message. */
  	private String message;



    /* ===================================================================== */
    /** This constructor initializes the Message.  Object content must be added
     *  seperately with setContent() method, and the object must be
     *  Serializable.
     *
     *  @param  message   The String message.
     *  @param  from   The port the message sender listens to.
     *
     */
  	public MulticastMessage(String message, int from){
		super(from);

		this.message = message;

	} //Constructor



    /* ===================================================================== */
    /** This constructor initializes the Message.  Object content must be added
     *  seperately with setContent() method, and the object must be
     *  Serializable.
     *
     *  @param  message   The String message.
     *  @param  from   The port the message sender listens to.
     *  @param  hops   The max number of hops.
     *
     */
  	public MulticastMessage(String message, int from, int hops){
		super(from, hops);

		this.message = message;

	} //Constructor


    /* ===================================================================== */
    /** This method returns the String content of the message.
     *
     *  @return  String   The message.
     *
     */
	public String getMessage(){

		return message;

	} //method: getMessage



} //class: MulticastMessage
</xmp>
</html>

