|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.builders.vwms.SCPcopy
Performs a transfer of a file from the current server to a host.
Uses invocation of ssh on the commandline to achieve its ends.
Since no password is used, the client machine (this server) has to be
configured to gain access (i.e. through the use of public keys).
Also note that the client needs execute rights on ssh.
A system that directlky acecsses ssh, and does not make use of Execute
is being developed.
| Constructor Summary | |
SCPcopy()
Deprecated. vpro-specific |
|
SCPcopy(java.lang.String sshpath)
Deprecated. vpro-specific |
|
SCPcopy(java.lang.String sshpath,
java.lang.String user)
Deprecated. vpro-specific |
|
SCPcopy(java.lang.String sshpath,
java.lang.String user,
java.lang.String host)
Deprecated. vpro-specific |
|
SCPcopy(java.lang.String sshpath,
java.lang.String user,
java.lang.String host,
java.lang.String path)
SCPCopy Constructor. |
|
| Method Summary | |
void |
copy(java.lang.String base,
java.lang.String src)
Transfers a file from this server to the host. |
void |
copy(java.lang.String base,
java.lang.String src,
java.lang.String dst)
Transfers a file from this server to a host. |
java.lang.String |
getHost()
Get name of the destination host |
java.lang.String |
getPath()
Get root-path of the file at the destination host |
java.lang.String |
getSSHpath()
Get path to ssh command |
java.lang.String |
getUser()
Get name of the destination user. |
static void |
main(java.lang.String[] args)
Deprecated. VPRO-specific |
boolean |
mkdir(java.lang.String path)
Creates a directory at the host. |
boolean |
mkdirs(java.lang.String path)
Creates a full directory path at the host. |
boolean |
realcopy(java.lang.String src,
java.lang.String dst)
Transfers a file at this server to the host. |
boolean |
remove(java.lang.String path)
Removes a file at the host. |
boolean |
removedir(java.lang.String path)
Removes a directory at the host. |
boolean |
rename(java.lang.String src,
java.lang.String dst)
Renames a file at the host. |
void |
setHost(java.lang.String host)
Set name of the destination host |
void |
setPath(java.lang.String path)
Set root-path of the file at the destination host |
void |
setSSHpath(java.lang.String path)
Set path to ssh command |
void |
setUser(java.lang.String user)
Set name of the destination user. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SCPcopy()
public SCPcopy(java.lang.String sshpath)
sshpath - Path to ssh command
public SCPcopy(java.lang.String sshpath,
java.lang.String user)
sshpath - Path to ssh commanduser - User name needed to log on at the destination host
public SCPcopy(java.lang.String sshpath,
java.lang.String user,
java.lang.String host)
sshpath - Path to ssh commanduser - User name needed to log on at the destination hosthost - Name of the destination host
public SCPcopy(java.lang.String sshpath,
java.lang.String user,
java.lang.String host,
java.lang.String path)
sshpath - Path to ssh commanduser - User name needed to log on at the destination hosthost - Name of the destination hostpath - Root path of the file at the destination host| Method Detail |
public void copy(java.lang.String base,
java.lang.String src,
java.lang.String dst)
base - Root path of the file on this serversrc - The actual file to transfer (includes path info)dst - Name of the destination host
public void copy(java.lang.String base,
java.lang.String src)
base - Root path of the file on this serversrc - The actual file to transfer (includes path info)public boolean mkdir(java.lang.String path)
path - directory to create
true if successfulpublic boolean mkdirs(java.lang.String path)
path - path to create
true if successful
public boolean rename(java.lang.String src,
java.lang.String dst)
src - Original file namedst - New file name
true if successful
public boolean realcopy(java.lang.String src,
java.lang.String dst)
src - file path at this serverdst - new file path at the host
true if successfulpublic boolean remove(java.lang.String path)
path - path of the file to remove
true if successfulpublic boolean removedir(java.lang.String path)
path - path of the directory to remove
true if successfulpublic java.lang.String getSSHpath()
public java.lang.String getPath()
public java.lang.String getHost()
public java.lang.String getUser()
public void setSSHpath(java.lang.String path)
public void setPath(java.lang.String path)
public void setHost(java.lang.String host)
public void setUser(java.lang.String user)
public static void main(java.lang.String[] args)
args - The commandline arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||