examples.transfer
Class DataTransferAgent

java.lang.Object
  extended byexamples.transfer.DataTransferAgent
All Implemented Interfaces:
Runnable, Serializable

public class DataTransferAgent
extends Object
implements Runnable, Serializable

The agent's purpose is migrate data from one host to another. This is done by means of a special service. The agent accesses a IOStreamService at a well known name and waits for data transmission. The received stream (propably from a file) is stored in the agent's corpus. Then the agent migrates to a host given at command line and finally pipes the data back to IOStreamService at the destination host.

Version:
"$Id: DataTransferAgent.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Ulrich Pinsdorf
See Also:
Serialized Form

Field Summary
 int BUFSIZE
          Size of the read/write buffer.
 String FILENAME
          Filename which specifies the file in the agent's corpus where the file to be transported is stored.
 String SERVICENAME
          The path name where the IOService is published in the server environment.
 
Constructor Summary
DataTransferAgent()
          Constructor.
 
Method Summary
 void run()
          Performs the agent's job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILENAME

public final String FILENAME
Filename which specifies the file in the agent's corpus where the file to be transported is stored. Due to the security architecture this has to be in the mutable part of the agent.


SERVICENAME

public final String SERVICENAME
The path name where the IOService is published in the server environment. This variable has to be set at the service provider accordingly.


BUFSIZE

public final int BUFSIZE
Size of the read/write buffer.

See Also:
Constant Field Values
Constructor Detail

DataTransferAgent

public DataTransferAgent()
Constructor. This is called only once in the agent's lifetime.

Method Detail

run

public void run()
Performs the agent's job. This method is called after each agent startup, e.g. after every migration. The agent's lifecycle is as follows:

Specified by:
run in interface Runnable


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.