public class ConnectionParameters extends Object
Modifier and Type | Field and Description |
---|---|
private byte[] |
clientCertificate |
private String |
clientCertificatePassword |
private String |
factoryId |
private String |
host |
private String |
password |
private String |
rootPath |
private byte[] |
serverCertificate |
private String |
sshFingerprint |
private String |
username |
Constructor and Description |
---|
ConnectionParameters()
Create a new empty parameters object.
|
Modifier and Type | Method and Description |
---|---|
URI |
changeHost(URI uri)
If the connection parameters include a specific host:port or root path
a new URI is created were the host:port is replaced and the root path is added
to the URI path.
|
static ConnectionParameters |
create(FileServerData fileServer)
Create a parameters object using information from the
FileServer object. |
byte[] |
getClientCertificate()
Get the client certificate that BASE should use to authenticate with the server
when connecting using SSL.
|
String |
getClientCertificatePassword()
Get the password that is needed to unlock the client certificate.
|
String |
getConnectionManagerFactoryId()
Get the connection manager factory that we should use to
access the file, or null to use auto-detection.
|
String |
getHost()
Get the host:port that should override the host:port
specified by the file URI.
|
String |
getPassword()
Get the password that should be used to authenticate the user.
|
String |
getRootPath()
Get the root path that must be added to all URI:s used with these
connection parameters.
|
byte[] |
getServerCertificate()
Get the public server certificate that indicates that we should only trust the
server if it can present a certificate that matches this.
|
String |
getSshFingerprint()
Get the SSH fingerprint of the server.
|
String |
getUsername()
Get the username that should be used to authenticate the user.
|
void |
setClientCertificate(byte[] certificate) |
void |
setClientCertificatePassword(String password) |
void |
setConnectionManagerFactoryId(String factoryId) |
void |
setHost(String host) |
void |
setPassword(String password) |
void |
setRootPath(String rootPath) |
void |
setServerCertificate(byte[] certificate) |
void |
setSshFingerprint(String sshFingerprint) |
void |
setUsername(String username) |
private String factoryId
private String host
private String username
private String password
private String rootPath
private String sshFingerprint
private byte[] serverCertificate
private byte[] clientCertificate
private String clientCertificatePassword
public ConnectionParameters()
public static ConnectionParameters create(FileServerData fileServer)
FileServer
object.public String getConnectionManagerFactoryId()
public void setConnectionManagerFactoryId(String factoryId)
public String getHost()
public void setHost(String host)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getRootPath()
public void setRootPath(String rootPath)
public byte[] getServerCertificate()
FileServer.getServerCertificate()
public void setServerCertificate(byte[] certificate)
public byte[] getClientCertificate()
FileServer.getClientCertificate()
public void setClientCertificate(byte[] certificate)
public String getClientCertificatePassword()
public void setClientCertificatePassword(String password)
public String getSshFingerprint()
public void setSshFingerprint(String sshFingerprint)
public URI changeHost(URI uri)
uri
- The URI to changePermissionDeniedException
- If the given URI tries to move outside the
root path by including '..' to step up one or more levels