org.objectweb.proactive.filetransfer
Class FileVector

java.lang.Object
  extended by org.objectweb.proactive.filetransfer.FileVector
All Implemented Interfaces:
java.io.Serializable

public class FileVector
extends java.lang.Object
implements java.io.Serializable

This class contains a result of a file transfer operation. It can be used to block until the operation has finished, or it can be passed to other file transfer operations using file transfer forwarding.

Author:
The ProActive Team (mleyton) Created on Feb 18, 2006
See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
FileVector()
           
 
Method Summary
protected  void add(FileTransferRequest ftr)
           
 void add(FileVector fw)
           
protected  void add(java.util.Vector newFileReq)
           
 java.io.File getFile(int i)
          This method will return a File object representing the result of the File Transfer operation (push or pull).
protected  java.util.Vector getFilesRequest()
          This method returns the file transfer requests.
 int size()
          Returns the current size of the vector
 void waitForAll()
          Waits for all the pending futures inside this file vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

FileVector

public FileVector()
Method Detail

waitForAll

public void waitForAll()
Waits for all the pending futures inside this file vector. If the files are still being transferred, then this method will block until the transfers have finished.


getFile

public java.io.File getFile(int i)
                     throws java.lang.Exception
This method will return a File object representing the result of the File Transfer operation (push or pull). If the file transfer operation has not finished, then this method will block until the file is sent/received. Note that if the returned value of this method is passed as a parameter to other push or pull operations, then these operations will not be aware that the file is the result of another operation. To avoid this issue, the FileVector object must be passed as parameter to other file transfer operations.

Parameters:
i - The index of the file inside this vector
Returns:
The File object that represents the path on a remote machine
Throws:
java.lang.Exception - An error if the file transfer operation did not succeed.

size

public int size()
Returns the current size of the vector

Returns:
The size of the vector.

getFilesRequest

protected java.util.Vector getFilesRequest()
This method returns the file transfer requests. It is mainly used in the internal implementation of the file transfer mechanism

Returns:
The vector containing the file requests.

add

protected void add(FileTransferRequest ftr)

add

protected void add(java.util.Vector newFileReq)

add

public void add(FileVector fw)


Copyright 2001-2007 INRIA All Rights Reserved.