import java.io.*;
public class Message implements Serializable
{
    public int m_source ; // message source 
    public int mid;   // message id
    public int  gid;   // group id
    public int m_type;  // message type
    public Object m_obj;  // message object
    public int m_num;

  // message object will compass different attributes of the message depending on the message type 


    public Message(int m_source, int m_type, int mid, int gid, Object m_obj ,int m_num)
    {
	this.m_source = m_source;
	this.m_type = m_type;
	this.mid = mid;
	this.gid = gid;
	this.m_obj = m_obj;
	this.m_num=m_num;
    }



    public int getmessagetype()
    {
	return this.m_type;
    }
    public void setmessagetype(int m_type)
    {
	this.m_type = m_type;
    }


    public int getmessageid()
    {
	return this.mid;
    }
    public void setmessageid(int mid)
    {
	this.mid = mid;
    }
    public int getmessagenum()
    {
	return this.m_num;
    }
    public void setmessagenum(int m_num)
    {
	this.m_num = m_num;
    }

    public int getgid()
    {
	return this.gid;
    }
    public void setgid(int gid)
    {
	this.gid = gid;
    }


    public Object getmessageobj()
    {
	return this.m_obj;
    }
    public void setmessageobj(Object m_obj)
    {
	this.m_obj = m_obj;
    }

    public int getmessagesource()
    {
	return this.m_source ;
    }

    public void setmessagesource(int m_source)
    {
	 this.m_source = m_source;
    }




}
