scripting
Interface IDataTransferrer

All Known Implementing Classes:
ScenarioConfig

public interface IDataTransferrer

A class that implements this interface can be used to transfer files to or from some nodes.

Author:
Leo Bosnjak

Method Summary
 boolean copyDirToNodesInternal(PlanetLabMgr planetLabApi, java.lang.String sourceDir, java.lang.String remoteDir, java.util.Vector<Node> nodes)
          Copies the sourceDir from the local filesystem to the remoteDir of every node.
 boolean execCmdOnNodesInternal(PlanetLabMgr planetLabApi, java.lang.String command, java.util.Vector<Node> nodes)
          Executes the given command on each node.
 boolean getDirFromNodesInternal(PlanetLabMgr planetLabApi, java.lang.String remoteDir, java.lang.String localDir, java.util.Vector<Node> nodes)
          Transfers the remote directory from each of the nodes and saves it to the local directory
 

Method Detail

copyDirToNodesInternal

boolean copyDirToNodesInternal(PlanetLabMgr planetLabApi,
                               java.lang.String sourceDir,
                               java.lang.String remoteDir,
                               java.util.Vector<Node> nodes)
Copies the sourceDir from the local filesystem to the remoteDir of every node.

Parameters:
planetLabApi -
sourceDir - - The directory to copy from
nodes - - The nodes to copy to

getDirFromNodesInternal

boolean getDirFromNodesInternal(PlanetLabMgr planetLabApi,
                                java.lang.String remoteDir,
                                java.lang.String localDir,
                                java.util.Vector<Node> nodes)
Transfers the remote directory from each of the nodes and saves it to the local directory

Parameters:
planetLabApi -
remoteDir - - the remote directory which is located at each node
localDir - - the local directory which is used as destination for the remote directories of the nodes. A subdirectory named like the hostname of each node will be created to save the remote dir of the node.
nodes - - the nodes from which the directory will be copied to our pc

execCmdOnNodesInternal

boolean execCmdOnNodesInternal(PlanetLabMgr planetLabApi,
                               java.lang.String command,
                               java.util.Vector<Node> nodes)
Executes the given command on each node.

Parameters:
planetLabApi -
command - - The shell command to execute on each node.
nodes - - the nodes from which the directory will be copied to our pc