public final class RemoteLocation extends FileTransferLocation
Constructor and Description |
---|
RemoteLocation(String host,
String user,
String password)
Create a remote location that uses password authentication.
|
RemoteLocation(String host,
String user,
String identity,
String passphrase)
Create a remote file location that uses SSH public key authentication.
|
Modifier and Type | Method and Description |
---|---|
void |
addPath(String filePath)
Adds a file or directory path.
|
void |
addPath(String inSrc,
String inDest)
Adds a file or directory source/destination pair
|
ByteRange |
getByteRange() |
String |
getHost()
Get the host name or address.
|
String |
getIdentity()
Get the path to the SSH private key file
|
String |
getPassword()
Get the password for authentication.
|
String |
getUser()
Get the user for authentication.
|
boolean |
isIPv6Host() |
boolean |
isSshKeyAuth()
Get whether SSH key authentication should be used or not.
|
void |
removeByteRange()
Remove any byte range setting
|
void |
setByteRange(ByteRange byteRange)
Specify the range of bytes to be downloaded.
|
void |
setPassword(String password)
Set the password
|
void |
setUser(String user)
Set the user for authentication
|
clear
public RemoteLocation(String host, String user, String password) throws IllegalArgumentException
host
- addressuser
- name for logging inpassword
- for logging inIllegalArgumentException
- when host, user or password is null or empty string ( @since 3.6)public RemoteLocation(String host, String user, String identity, String passphrase) throws IllegalArgumentException
host
- addressuser
- user name for logging inidentity
- is the path to local file containing the SSH identity (private key)passphrase
- used to secure the private key (if needed)IllegalArgumentException
- when host, user or identity (SSH private key path)
is null or empty string ( @since 3.6)public void addPath(String filePath) throws ValidationException
FileTransferLocation
addPath
in class FileTransferLocation
filePath
- the path of the file or directory to addValidationException
- if the format is invalidpublic void addPath(String inSrc, String inDest) throws ValidationException
FileTransferLocation
addPath
in class FileTransferLocation
inSrc
- pathinDest
- pathValidationException
- if the format is invalidpublic String getHost()
public String getIdentity()
public String getPassword()
public void setPassword(String password)
password
- the password for authenticationIllegalArgumentException
- when password is null or empty string ( @since 3.6)public String getUser()
public boolean isSshKeyAuth()
public void setUser(String user)
user
- the user for authenticationIllegalArgumentException
- when user is null or empty string ( @since 3.6)public boolean isIPv6Host()
public void setByteRange(ByteRange byteRange)
byteRange
- the byte rangepublic ByteRange getByteRange()
public void removeByteRange()
Copyright © 2017 Aspera Inc.. All rights reserved.