Connecting to a RAD Instance by Using a URI in Java

You can use a URI to connect to a local or remote RAD instance. You can use the class URIconnection in Java for connecting using a URI. For more information, see Connecting in Python to a RAD Instance by Using a URI.

The following constructors are supported.

public URIConnection(String src) throws IOException {
        this(src, DEFAULT_SCHEMES);
}

public URIConnection(String src, Set<String> schemes)
        throws IOException {
}

public URIConnection(String src, Set<String> schemes,
        Set<String> certfiles) throws IOException {
}

Use the different constructors depending on how much control you need over the connection.

For methods, the following functions are supported for adding or removing certificates for TLS connections, and connecting and processing PAM information.

public void addCertFile(String certfile) {
}

public void rmCertFile(String certfile) {
}

public Connection connect(Credentials cred) throws IOException {
}

public void processPAMAuth(PAMCredentials cred, Connection con) throws IOException {
}

The following utility functions are supported for providing information about a RAD instance:

  • public String getAuth()
  • public String getCredClass()
  • public void setCredClass(String klass) throws IOException

  • public String getHost()
  • public String getPath()
  • public int getPort()
  • public String getSrc()
  • public String getScheme()
  • public Set<String> getSchemes()
  • public String getUser()

You can use the class PAMCredentials to create a set of PAM credentials for authentication. The supported constructor is public PAMCredentials(String pass).