|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.module.builders.vwms.SCPcopy
public class 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.
| Field Summary | |
|---|---|
(package private) String |
dsthost
Name of the destination host |
(package private) String |
dstpath
Root-path of the file at the destination host |
(package private) String |
dstuser
Name of the destination user. |
(package private) Execute |
exec
Program runner for executing the 'ssh' command. |
(package private) String |
sshpath
Path to ssh command |
(package private) String |
thisserver
Name of the current server |
| Constructor Summary | |
|---|---|
SCPcopy()
Deprecated. vpro-specific |
|
SCPcopy(String sshpath)
Deprecated. vpro-specific |
|
SCPcopy(String sshpath,
String user)
Deprecated. vpro-specific |
|
SCPcopy(String sshpath,
String user,
String host)
Deprecated. vpro-specific |
|
SCPcopy(String sshpath,
String user,
String host,
String path)
SCPCopy Constructor. |
|
| Method Summary | |
|---|---|
void |
copy(String base,
String src)
Transfers a file from this server to the host. |
void |
copy(String base,
String src,
String dst)
Transfers a file from this server to a host. |
String |
getHost()
Get name of the destination host |
String |
getPath()
Get root-path of the file at the destination host |
String |
getSSHpath()
Get path to ssh command |
String |
getUser()
Get name of the destination user. |
static void |
main(String[] args)
Deprecated. VPRO-specific |
boolean |
mkdir(String path)
Creates a directory at the host. |
boolean |
mkdirs(String path)
Creates a full directory path at the host. |
boolean |
realcopy(String src,
String dst)
Transfers a file at this server to the host. |
boolean |
remove(String path)
Removes a file at the host. |
boolean |
removedir(String path)
Removes a directory at the host. |
boolean |
rename(String src,
String dst)
Renames a file at the host. |
void |
setHost(String host)
Set name of the destination host |
void |
setPath(String path)
Set root-path of the file at the destination host |
void |
setSSHpath(String path)
Set path to ssh command |
void |
setUser(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 |
| Field Detail |
|---|
Execute exec
String thisserver
String dstpath
String dstuser
String dsthost
String sshpath
| Constructor Detail |
|---|
public SCPcopy()
public SCPcopy(String sshpath)
sshpath - Path to ssh command
public SCPcopy(String sshpath,
String user)
sshpath - Path to ssh commanduser - User name needed to log on at the destination host
public SCPcopy(String sshpath,
String user,
String host)
sshpath - Path to ssh commanduser - User name needed to log on at the destination hosthost - Name of the destination host
public SCPcopy(String sshpath,
String user,
String host,
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(String base,
String src,
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(String base,
String src)
base - Root path of the file on this serversrc - The actual file to transfer (includes path info)public boolean mkdir(String path)
path - directory to create
true if successfulpublic boolean mkdirs(String path)
path - path to create
true if successful
public boolean rename(String src,
String dst)
src - Original file namedst - New file name
true if successful
public boolean realcopy(String src,
String dst)
src - file path at this serverdst - new file path at the host
true if successfulpublic boolean remove(String path)
path - path of the file to remove
true if successfulpublic boolean removedir(String path)
path - path of the directory to remove
true if successfulpublic String getSSHpath()
public String getPath()
public String getHost()
public String getUser()
public void setSSHpath(String path)
public void setPath(String path)
public void setHost(String host)
public void setUser(String user)
public static void main(String[] args)
args - The commandline arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||