public class ConnectionParameters
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private byte[] |
clientCertificate |
private java.lang.String |
clientCertificatePassword |
private java.lang.String |
factoryId |
private java.lang.String |
host |
private java.lang.String |
password |
private java.lang.String |
rootPath |
private byte[] |
serverCertificate |
private java.lang.String |
sshFingerprint |
private java.lang.String |
username |
Constructor and Description |
---|
ConnectionParameters()
Create a new empty parameters object.
|
Modifier and Type | Method and Description |
---|---|
java.net.URI |
changeHost(java.net.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.
|
java.lang.String |
getClientCertificatePassword()
Get the password that is needed to unlock the client certificate.
|
java.lang.String |
getConnectionManagerFactoryId()
Get the connection manager factory that we should use to
access the file, or null to use auto-detection.
|
java.lang.String |
getHost()
Get the host:port that should override the host:port
specified by the file URI.
|
java.lang.String |
getPassword()
Get the password that should be used to authenticate the user.
|
java.lang.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.
|
java.lang.String |
getSshFingerprint()
Get the SSH fingerprint of the server.
|
java.lang.String |
getUsername()
Get the username that should be used to authenticate the user.
|
void |
setClientCertificate(byte[] certificate) |
void |
setClientCertificatePassword(java.lang.String password) |
void |
setConnectionManagerFactoryId(java.lang.String factoryId) |
void |
setHost(java.lang.String host) |
void |
setPassword(java.lang.String password) |
void |
setRootPath(java.lang.String rootPath) |
void |
setServerCertificate(byte[] certificate) |
void |
setSshFingerprint(java.lang.String sshFingerprint) |
void |
setUsername(java.lang.String username) |
private java.lang.String factoryId
private java.lang.String host
private java.lang.String username
private java.lang.String password
private java.lang.String rootPath
private java.lang.String sshFingerprint
private byte[] serverCertificate
private byte[] clientCertificate
private java.lang.String clientCertificatePassword
public ConnectionParameters()
public static ConnectionParameters create(FileServerData fileServer)
FileServer
object.public java.lang.String getConnectionManagerFactoryId()
public void setConnectionManagerFactoryId(java.lang.String factoryId)
public java.lang.String getHost()
public void setHost(java.lang.String host)
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getRootPath()
public void setRootPath(java.lang.String rootPath)
public byte[] getServerCertificate()
FileServer.getServerCertificate()
public void setServerCertificate(byte[] certificate)
public byte[] getClientCertificate()
FileServer.getClientCertificate()
public void setClientCertificate(byte[] certificate)
public java.lang.String getClientCertificatePassword()
public void setClientCertificatePassword(java.lang.String password)
public java.lang.String getSshFingerprint()
public void setSshFingerprint(java.lang.String sshFingerprint)
public java.net.URI changeHost(java.net.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