package agents.qoagent; //file name: Message.java /***************************************************************** * Class name: Message * Goal: Saving a message that was sent from one side of the * negotiation to another side. A message contains the message ID * and the body (the content). ****************************************************************/ class Message { private String m_sID; private String m_sBody; /***************************************************************** * Method name: Message() * Goal: Constructor. * Description: Initialize the class variables. * Input: Two strings - the message ID and its body. * Output: None. ****************************************************************/ public Message(String id, String body) { m_sID=id; m_sBody=body; } /***************************************************************** * Method name: setId() * Goal: Setting the message ID. * Input: A string. * Output: None. ****************************************************************/ public void setId(String id) { m_sID=id; } /***************************************************************** * Method name: setBody() * Goal: Setting the message body. * Input: A string. * Output: None. ****************************************************************/ public void setBody(String body) { m_sBody=body; } /***************************************************************** * Method name: getId() * Goal: Return the message ID. * Input: None. * Output: A string. ***************************************************************/ public String getId() { return m_sID; } /***************************************************************** * Method name: getBody() * Goal: Return the message body. * Input: None. * Output: A string. ***************************************************************/ public String getBody() { return m_sBody; } }