com.agentfactory.cldc.migration
Class OutAgent

java.lang.Object
  extended by com.agentfactory.cldc.migration.OutAgent

public class OutAgent
extends java.lang.Object

The OutAgent class represents an agent that will migrate from the local platform. It contains the agent name, the destination address, and the URL of where the agent's design is located.

Author:
Conor Muldoon

Constructor Summary
OutAgent(java.lang.Object agtName, java.lang.String url, java.lang.String design)
          Creates a new instance of OutAgent.
 
Method Summary
 void write(java.io.DataOutputStream output, MigrationPlatform plat, boolean b)
          Causes the destination, design URL, and the agent's state to be written to a data output stream.
 void writeName(java.io.DataOutputStream output)
          Writes the agent's name to a data output stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutAgent

public OutAgent(java.lang.Object agtName,
                java.lang.String url,
                java.lang.String design)
Creates a new instance of OutAgent.

Parameters:
agtName - the name of the agent.
url - the agent's destination.
design - the URL of where the agent's design may be obtained.
Method Detail

write

public void write(java.io.DataOutputStream output,
                  MigrationPlatform plat,
                  boolean b)
           throws java.io.IOException
Causes the destination, design URL, and the agent's state to be written to a data output stream.

Parameters:
output - the specified data output stream.
plat - the migration platform, which the agent currently resides on.
Throws:
java.io.IOException - if there is an I/O error.

writeName

public void writeName(java.io.DataOutputStream output)
               throws java.io.IOException
Writes the agent's name to a data output stream.

Parameters:
output - the specified data output stream.
Throws:
java.io.IOException - if there is an I/O error.