com.agentfactory.cldc.mts
Class MessageHolder

java.lang.Object
  extended by com.agentfactory.cldc.mts.MessageHolder

public class MessageHolder
extends java.lang.Object

The message holder associates message with their recipients. It is used to store the association until the platform is ready to send the message.

Author:
Conor Muldoon

Constructor Summary
MessageHolder(FOS messageTo, Message mess, FOS toAd)
          Creates an instance of MessageHolder.
 
Method Summary
 void write(java.io.DataOutputStream dos)
          Writes the message to the data output stream, along with the name name of the agent that the message is to be sent to.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageHolder

public MessageHolder(FOS messageTo,
                     Message mess,
                     FOS toAd)
Creates an instance of MessageHolder.

Parameters:
messageTo - the agent that the message is to be sent to.
mess - the message that is to be sent.
toAd - the address of the agent that the message is to be sent.
Method Detail

write

public void write(java.io.DataOutputStream dos)
           throws java.io.IOException
Writes the message to the data output stream, along with the name name of the agent that the message is to be sent to.

Parameters:
dos - the data output stream that the information is to be written to.
Throws:
java.io.IOException - if there is an I/O error.