Class ConnectionInfo

java.lang.Object
com.aceql.jdbc.commons.ConnectionInfo

public class ConnectionInfo
extends Object
Allows to get all the info set and passed when creating an SQL Connection to the remote AceQL Server.
A ConnectionInfo instance is retrieved with the AceQLConnection.getConnectionInfo() call:
 
 // Casts the current Connection to get an AceQLConnection object
 AceQLConnection aceqlConnection = (AceQLConnection) connection;
 
 ConnectionInfo connectionInfo = aceqlConnection.getConnectionInfo();
 System.out.println("connectTimeout: " + connectionInfo.getConnectTimeout());
 System.out.println("All Info      : " + connectionInfo);
 // Etc.
 
 
Since:
6.0
Author:
Nicolas de Pomereu
  • Method Details

    • getUrl

      public String getUrl()
      Gets the URL of the remote database
      Returns:
      the URL of the remote database
    • getDatabase

      public String getDatabase()
      Gets the remote database name
      Returns:
      the remote database name
    • getAuthentication

      public PasswordAuthentication getAuthentication()
      Gets the main authentication info against the AceQL server
      Returns:
      the main authentication info
    • isPasswordSessionId

      public boolean isPasswordSessionId()
      Says if the password is an AceQL Session ID. Applies only to Professional Edition.
      Returns:
      true if the password is an AceQL Session ID, else false
    • getProxy

      public Proxy getProxy()
      Gets the Proxy in use. Returns null if no Proxy is in use.
      Returns:
      the Proxy in use.
    • getProxyAuthentication

      public PasswordAuthentication getProxyAuthentication()
      Gets the Proxy username and password. Returns null if no Proxy is in use.
      Returns:
      the Proxy username and password.
    • getConnectTimeout

      public int getConnectTimeout()
      Gets the specified timeout value, in milliseconds, to be used when opening a communications link to the remote server. If the timeout expires before the connection can be established, a java.net.SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout. See URLConnection.setConnectTimeout(int)
      Returns:
      the connect Timeout
    • getReadTimeout

      public int getReadTimeout()
      Gets the specified timeout value, in milliseconds, to be used when opening a communications link to the remote server. If the timeout expires before the connection can be established, a java.net.SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout. See URLConnection.setConnectTimeout(int)
      Returns:
      the read Timeout
    • isGzipResult

      public boolean isGzipResult()
      Gets a boolean that say if the ResultSet is gzipped before download.
      Returns:
      true if the ResultSet is gzipped before download, else false
    • getEditionType

      public EditionType getEditionType()
      Gets the AceQL Client JDBC Driver Edition: Community of Professional.
      Returns:
      the Edition Type: Community of Professional.
    • getResultSetMetaDataPolicy

      public ResultSetMetaDataPolicy getResultSetMetaDataPolicy()
      Gets the ResultSetMetaDataPolicy. Defines the ResultSet Metadata policy. Says if the ResultSet Metadata is to be downloaded along with the ResultSet.

      This option is only used with the Professional Edition.
      Returns:
      the ResultSet Metadata policy
    • getRequestProperties

      public Map<String,​String> getRequestProperties()
      Gets all the request properties that are set to the underlying HttpURLConnection for each http call.

      This option is only used with the Professional Edition.
      Returns:
      the request properties that are set to the underlying HttpURLConnection for each http call.
    • getClobReadCharset

      public String getClobReadCharset()
      Gets the charset name to use when reading a CLOB content with the ResultSet#getString() methods. Defaults to null.
      Returns:
      the charset name to use when reading a CLOB content with the ResultSet#getString() methods. Defaults to null.
    • getClobWriteCharset

      public String getClobWriteCharset()
      Gets the charset name to use when writing a CLOB content with PreparedStatement streaming methods.
      This option is only used with the Professional Edition.
      Returns:
      the charset name to use when writing a CLOB content with PreparedStatement streaming methods.
    • getCreationDateTime

      public Instant getCreationDateTime()
      Gets the creation date and time of the Connection.
      Returns:
      the creation date and time of the Connection.
    • toString

      public String toString()
      Overrides:
      toString in class Object