org.objectweb.proactive.core.process.filetransfer
Class AbstractCopyProtocol

java.lang.Object
  extended byorg.objectweb.proactive.core.process.filetransfer.AbstractCopyProtocol
All Implemented Interfaces:
CopyProtocol
Direct Known Subclasses:
DummyCopyProtocol, SecureCopyProtocol

public abstract class AbstractCopyProtocol
extends java.lang.Object
implements CopyProtocol

AbstractCopyProtocol implements default behaviour of methods in CopyProtocol

Since:
ProActive 2.3
Version:
1.0, 2005/08/26
Author:
ProActive Team

Field Summary
protected  boolean closeStream
           
protected  FileTransferWorkShop.StructureInformation dstInfoParams
           
protected  FileTransfer[] fileTransfer
           
protected  boolean isDefaultProtocol
           
protected static org.apache.log4j.Logger logger
           
protected  java.lang.String name
           
protected  FileTransferWorkShop.StructureInformation srcInfoParams
           
 
Constructor Summary
AbstractCopyProtocol(java.lang.String name)
           
 
Method Summary
protected  java.lang.String getErrorMessage(java.io.InputStream in)
          Note: this method will block if the stream is not closed!!!
protected  FileTransfer.FileDescription[] getHeteronymousAll()
           
protected  FileTransfer.DirectoryDescription[] getHeteronymousDirs()
          Note that for this only the dirname is considered, and not the dirpath.
protected  FileTransfer.FileDescription[] getHeteronymousFiles()
          Note that for this only the filename is considered, and not the filepath.
protected  FileTransfer.FileDescription[] getHomonymousAll()
           
protected  FileTransfer.DirectoryDescription[] getHomonymousDirs()
          Note that for this only the dirname is considered, and not the dirpath.
protected  FileTransfer.FileDescription[] getHomonymousFiles()
          Note that for this only the filename is considered, and not the filepath.
 java.lang.String getProtocolName()
           
 boolean isDefaultProtocol()
           
 boolean isDummyProtocol()
          This method should only be modified in the dummy copy protocol class: DummyCopyProtocol
 void setDefaultProtocol(boolean isDefaultProtocol)
           
 void setDstInfo(FileTransferWorkShop.StructureInformation dstInfoParams)
           
 void setFileTransferDefinitions(FileTransfer[] fileTransfer)
           
 void setProtocolName(java.lang.String name)
           
 void setSrcInfo(FileTransferWorkShop.StructureInformation srcInfoParams)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.proactive.core.process.filetransfer.CopyProtocol
checkProtocol, startFileTransfer
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

isDefaultProtocol

protected boolean isDefaultProtocol

name

protected java.lang.String name

fileTransfer

protected FileTransfer[] fileTransfer

srcInfoParams

protected FileTransferWorkShop.StructureInformation srcInfoParams

dstInfoParams

protected FileTransferWorkShop.StructureInformation dstInfoParams

closeStream

protected boolean closeStream
Constructor Detail

AbstractCopyProtocol

public AbstractCopyProtocol(java.lang.String name)
Method Detail

getProtocolName

public java.lang.String getProtocolName()
Specified by:
getProtocolName in interface CopyProtocol

setProtocolName

public void setProtocolName(java.lang.String name)
Specified by:
setProtocolName in interface CopyProtocol

isDefaultProtocol

public boolean isDefaultProtocol()
Specified by:
isDefaultProtocol in interface CopyProtocol

setDefaultProtocol

public void setDefaultProtocol(boolean isDefaultProtocol)
Specified by:
setDefaultProtocol in interface CopyProtocol

setFileTransferDefinitions

public void setFileTransferDefinitions(FileTransfer[] fileTransfer)
Specified by:
setFileTransferDefinitions in interface CopyProtocol

setSrcInfo

public void setSrcInfo(FileTransferWorkShop.StructureInformation srcInfoParams)
Specified by:
setSrcInfo in interface CopyProtocol

setDstInfo

public void setDstInfo(FileTransferWorkShop.StructureInformation dstInfoParams)
Specified by:
setDstInfo in interface CopyProtocol

isDummyProtocol

public boolean isDummyProtocol()
This method should only be modified in the dummy copy protocol class: DummyCopyProtocol

Specified by:
isDummyProtocol in interface CopyProtocol

getHomonymousFiles

protected FileTransfer.FileDescription[] getHomonymousFiles()
Note that for this only the filename is considered, and not the filepath.

Returns:
an array with the reference to all the Files that are homonymous. That is to say, with the same source and destination filename.

getHeteronymousFiles

protected FileTransfer.FileDescription[] getHeteronymousFiles()
Note that for this only the filename is considered, and not the filepath.

Returns:
an array with the reference to all the Files that are heteronymous. That is to say, with different src and destination filename.

getHomonymousDirs

protected FileTransfer.DirectoryDescription[] getHomonymousDirs()
Note that for this only the dirname is considered, and not the dirpath.

Returns:
an array with the reference to all the Dirs that are homonymous. That is to say, with the same source and destination dirname.

getHeteronymousDirs

protected FileTransfer.DirectoryDescription[] getHeteronymousDirs()
Note that for this only the dirname is considered, and not the dirpath.

Returns:
an array with the reference to all the Directories that are heteronymous. That is to say, with different src and destination dirname.

getHeteronymousAll

protected FileTransfer.FileDescription[] getHeteronymousAll()

getHomonymousAll

protected FileTransfer.FileDescription[] getHomonymousAll()

getErrorMessage

protected java.lang.String getErrorMessage(java.io.InputStream in)
Note: this method will block if the stream is not closed!!!

Parameters:
in - An input stream
Returns:
the content of the stream


Copyright 2001-2005 INRIA All Rights Reserved.