se.sics.tasim.aw
Class Message

java.lang.Object
  extended by se.sics.tasim.aw.Message
All Implemented Interfaces:
Transportable

public class Message
extends java.lang.Object
implements Transportable

Message is used for the communication between all entities in simulations and with the server administration. Each message consists of a sender, a receiver and a content. The content of the messages describe what the purpose of the communication is.


Constructor Summary
Message()
           
Message(java.lang.String sender, java.lang.String receiver, Transportable content)
           
Message(java.lang.String receiver, Transportable content)
           
 
Method Summary
 Message createReply(Transportable content)
           
 Transportable getContent()
           
 java.lang.String getReceiver()
           
 java.lang.String getSender()
           
 java.lang.String getTransportName()
          Returns the transport name used for externalization.
 void read(TransportReader reader)
          Reads the state for this transportable from the specified reader.
 void setSender(java.lang.String sender)
           
 java.lang.String toString()
           
 void write(TransportWriter writer)
          Writes the state for this transportable to the specified writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message(java.lang.String receiver,
               Transportable content)

Message

public Message(java.lang.String sender,
               java.lang.String receiver,
               Transportable content)

Message

public Message()
Method Detail

getSender

public java.lang.String getSender()

setSender

public void setSender(java.lang.String sender)

getReceiver

public java.lang.String getReceiver()

getContent

public Transportable getContent()

createReply

public Message createReply(Transportable content)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTransportName

public java.lang.String getTransportName()
Returns the transport name used for externalization.

Specified by:
getTransportName in interface Transportable

read

public void read(TransportReader reader)
          throws java.text.ParseException
Description copied from interface: Transportable
Reads the state for this transportable from the specified reader.

Specified by:
read in interface Transportable
Parameters:
reader - the reader to read data from
Throws:
java.text.ParseException - if a parse error occurs

write

public void write(TransportWriter writer)
Description copied from interface: Transportable
Writes the state for this transportable to the specified writer.

Specified by:
write in interface Transportable
Parameters:
writer - the writer to write data to


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.