|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQNet
This interface provides network capabilities available in aquascript.
An instance of an object implementing this interface is available via aqua.net alias.
Method Summary | |
---|---|
void |
ftpFrom(String server,
Object userid,
Object password,
AQFileSet fileset,
String remotedir)
Copies file(s) from a FTP server. |
void |
ftpTo(String server,
Object userid,
Object password,
AQFileSet fileset,
String remotedir)
Copies file(s) to a FTP server. |
void |
get(String url,
String dest)
Gets a file from a URL source. |
AQFtpFileSystem |
newFtpFileSystem(String server,
Object userid,
Object password)
Constructs an instance of FTP. |
AQHadoopDistributedFileSystem |
newHadoopDistributedFileSystem(String name)
Constructs an instance of distributed file system. |
AQWebClient |
newWebClient()
Constructs an instance of web client. |
void |
scpFrom(String file,
String todir,
String host,
Object username,
Object password,
String keyfile,
Object passphrase,
Boolean trust,
String knownhosts)
Copies file(s) from a remote machine running an SSH daemon to the local machine. |
void |
scpTo(String file,
AQFileSet fileset,
Object todir,
String host,
Object username,
Object password,
Object keyfile,
Object passphrase,
Boolean trust,
String knownhosts)
Copies file(s) from the local machine to a remote machine running an SSH daemon |
void |
sftpFrom(String file,
String todir,
String host,
Object username,
Object password,
String keyfile,
Object passphrase,
Boolean trust,
String knownhosts)
Copies file(s) from a remote machine running an SSH daemon to the local machine. |
void |
sftpTo(String file,
AQFileSet fileset,
String todir,
String host,
Object username,
Object password,
String keyfile,
Object passphrase,
Boolean trust,
String knownhosts)
Copies file(s) from the local machine to a remote machine running an SSH daemon |
void |
sshexec(String command,
String commandFile,
boolean trust,
String host,
Object username,
String keyfile,
String output,
Object passphrase,
Integer timeout,
String knownhosts)
Executes a command on a remote machine via SSH using key based authentication. |
void |
sshexec(String command,
String commandFile,
String host,
Object username,
Object password,
String output,
Boolean trust,
Integer timeout,
String knownhosts)
Executes a command on a remote machine via SSH using password based authentication. |
Method Detail |
---|
AQFtpFileSystem newFtpFileSystem(String server, Object userid, Object password) throws Exception
server
- the address of the remote ftp serveruserid
- the login id to use on the ftp serverpassword
- the login password to use on the ftp server
Exception
AQHadoopDistributedFileSystem newHadoopDistributedFileSystem(String name) throws Exception
name
- the distributed file system name (e.g. "hdfs://Exception
AQWebClient newWebClient()
void ftpFrom(String server, Object userid, Object password, AQFileSet fileset, String remotedir) throws Exception
fileset
parameter either as fileset.setBaseDir(localDirectoryName)
or as fileset.setFile(localFilePathname)
;
if fileset.setFile(localFilePathname)
is used, the directory contains the specified local file is used as the directory
to which remote files are saved.
server
- the address of the remote ftp serveruserid
- the login id to use on the ftp serverpassword
- the login password to use on the ftp serverfileset
- The set of files to be copied from the remote ftp server. Either base directory or file must be specified.remotedir
- remote directory on the ftp server from where file(s) to be copied, default is the userid login directory
Exception
- if failed to copy file(s)void ftpTo(String server, Object userid, Object password, AQFileSet fileset, String remotedir) throws Exception
server
- the address of the remote ftp serveruserid
- the login id to use on the ftp serverpassword
- the login password to use on the ftp serverfileset
- The set of files to be copied to the remote ftp server. Either base directory or file must be specified.remotedir
- remote directory on the ftp server from where file(s) to be copied, default is the userid login directory
Exception
- if failed to copy file(s)void scpFrom(String file, String todir, String host, Object username, Object password, String keyfile, Object passphrase, Boolean trust, String knownhosts) throws Exception
file
- The file(s) to copy from the remote machine.todir
- The directory on the local machine where file(s) to be saved.host
- the hostname or IP address of the remote machine to which you wish to connect; a port number can optionally follow the host,
separated by a colonusername
- the username on the remote machine to which you are connectingpassword
- the login password to use on the remote machine, can be omitted if you specify the keyfile
parameterkeyfile
- location of the file holding the private key, can be omitted if you specify the password
parameterpassphrase
- passphrase for your private key, defaults to an empty string if keyfile is specifiedtrust
- trusts all unknown hosts if set to true, defaults to falseknownhosts
- sets the known hosts file to use to validate the identity of the remote host, this must be a SSH2 format file; defaults to ${user
.home}/.ssh/known_hosts
Exception
- if failed to copy file(s)void scpTo(String file, AQFileSet fileset, Object todir, String host, Object username, Object password, Object keyfile, Object passphrase, Boolean trust, String knownhosts) throws Exception
file
- The file(s) to copy to the remote machine, either this or fileset
should be set.fileset
- The set of files to be copied from the local machine to the remote machine, either this or file
should be set.todir
- The directory on the remote machine where file(s) to be savedhost
- the hostname or IP address of the remote machine to which you wish to connect; a port number can optionally follow the host,
separated by a colonusername
- the username on the remote host to which you are connectingpassword
- the login password to use on the remote machine, can be omitted if you specify the keyfile
parameterkeyfile
- location of the file holding the private key, can be omitted if you specify the password
parameterpassphrase
- passphrase for your private key, defaults to an empty string if keyfile is specifiedtrust
- trusts all unknown hosts if set to true, defaults to falseknownhosts
- sets the known hosts file to use to validate the identity of the remote host, this must be a SSH2 format file; defaults to ${user
.home}/.ssh/known_hosts
Exception
- if failed to copy file(s)void sftpFrom(String file, String todir, String host, Object username, Object password, String keyfile, Object passphrase, Boolean trust, String knownhosts) throws Exception
file
- The file(s) to copy from the remote machine.todir
- The directory on the local machine where file(s) to be saved.host
- the hostname or IP address of the remote machine to which you wish to connect; a port number can optionally follow the host,
separated by a colonusername
- the username on the remote machine to which you are connectingpassword
- the login password to use on the remote machine, can be omitted if you specify the keyfile
parameterkeyfile
- location of the file holding the private key, can be omitted if you specify the password
parameterpassphrase
- passphrase for your private key, defaults to an empty string if keyfile is specifiedtrust
- trusts all unknown hosts if set to true, defaults to falseknownhosts
- sets the known hosts file to use to validate the identity of the remote host, this must be a SSH2 format file; defaults to ${user
.home}/.ssh/known_hosts
Exception
- if failed to copy file(s)void sftpTo(String file, AQFileSet fileset, String todir, String host, Object username, Object password, String keyfile, Object passphrase, Boolean trust, String knownhosts) throws Exception
file
- The file(s) to copy to the remote machine, either this or fileset
should be set.fileset
- The set of files to be copied from the local machine to the remote machine, either this or file
should be set.todir
- The directory on the remote machine where file(s) to be savedhost
- the hostname or IP address of the remote machine to which you wish to connect; a port number can optionally follow the host,
separated by a colonusername
- the username on the remote host to which you are connectingpassword
- the login password to use on the remote machine, can be omitted if you specify the keyfile
parameterkeyfile
- location of the file holding the private key, can be omitted if you specify the password
parameterpassphrase
- passphrase for your private key, defaults to an empty string if keyfile is specifiedtrust
- trusts all unknown hosts if set to true, defaults to falseknownhosts
- sets the known hosts file to use to validate the identity of the remote host, this must be a SSH2 format file; defaults to ${user
.home}/.ssh/known_hosts
Exception
- if failed to copy file(s)void sshexec(String command, String commandFile, String host, Object username, Object password, String output, Boolean trust, Integer timeout, String knownhosts) throws Exception
command
- the command to run on the remote host, either this or commandFile
must be setcommandFile
- the file that contains the commands to run on the remote host, either this or command
must be sethost
- the hostname or IP address of the remote host to which you wish to connectusername
- the username on the remote host to which you are connectingpassword
- the login password to use on the remote hostoutput
- name of the file to which to write the output, defaults to an empty stringtrust
- trusts all unknown hosts if set to true, defaults to falsetimeout
- stop the command if it doesn't finish within the specified time, in milliseconds; defaults to 0 which means 'wait forever'knownhosts
- sets the known hosts file to use to validate the identity of the remote host, this must be a SSH2 format file; defaults to ${user
.home}/.ssh/known_hosts
Exception
- if failed to execute command remotelyvoid sshexec(String command, String commandFile, boolean trust, String host, Object username, String keyfile, String output, Object passphrase, Integer timeout, String knownhosts) throws Exception
command
- the command to run on the remote host, either this or commandFile
must be setcommandFile
- the file that contains the commands to run on the remote host, either this or command
must be settrust
- trusts all unknown hosts if set to truehost
- the hostname or IP address of the remote host to which you wish to connectusername
- the username on the remote host to which you are connectingkeyfile
- location of the file holding the private keyoutput
- name of the file to which to write the output, defaults to an empty stringpassphrase
- passphrase for your private key, defaults to an empty stringtimeout
- stop the command if it doesn't finish within the specified time, in milliseconds; defaults to 0 which means 'wait forever'knownhosts
- sets the known hosts file to use to validate the identity of the remote host, this must be a SSH2 format file; defaults to ${user
.home}/.ssh/known_hosts
Exception
- if failed to execute command remotelyvoid get(String url, String dest) throws Exception
url
- The URL to get; required.dest
- The fully qualified name or name of the file to be saved; required.
Exception
- If unable to retrieve the URL source, or if unable to write to file specified.
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |