Package com.aceql.jdbc.commons
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
A
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 Summary
Modifier and Type Method Description PasswordAuthentication
getAuthentication()
Gets the main authentication info against the AceQL serverString
getClobReadCharset()
Gets the charset name to use when reading a CLOB content with theResultSet#getString()
methods.String
getClobWriteCharset()
Gets the charset name to use when writing a CLOB content withPreparedStatement
streaming methods.int
getConnectTimeout()
Gets the specified timeout value, in milliseconds, to be used when opening a communications link to the remote server.Instant
getCreationDateTime()
Gets the creation date and time of the Connection.String
getDatabase()
Gets the remote database nameint
getMaxRetries()
Gets the maximum number of retries for failed requests.Proxy
getProxy()
Gets theProxy
in use.PasswordAuthentication
getProxyAuthentication()
Gets theProxy
username and password.int
getReadTimeout()
Gets the specified timeout value, in milliseconds, to be used when opening a communications link to the remote server.Map<String,String>
getRequestProperties()
Gets all the request properties that are set to the underlyingHttpURLConnection
for each http call.ResultSetMetaDataPolicy
getResultSetMetaDataPolicy()
Gets theResultSetMetaDataPolicy
.int
getRetryIntervalMs()
Gets the interval between retries in milliseconds.String
getUrl()
Gets the URL of the remote databaseboolean
isGzipResult()
Gets a boolean that say if theResultSet
is gzipped before download.boolean
isPasswordSessionId()
Says if the password is an AceQL Session ID.String
toString()
-
Method Details
-
getUrl
Gets the URL of the remote database- Returns:
- the URL of the remote database
-
getDatabase
Gets the remote database name- Returns:
- the remote database name
-
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.- Returns:
true
if the password is an AceQL Session ID, elsefalse
-
getProxy
Gets theProxy
in use. Returns null if noProxy
is in use.- Returns:
- the
Proxy
in use.
-
getProxyAuthentication
Gets theProxy
username and password. Returns null if noProxy
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. SeeURLConnection.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. SeeURLConnection.setConnectTimeout(int)
- Returns:
- the read Timeout
-
isGzipResult
public boolean isGzipResult()Gets a boolean that say if theResultSet
is gzipped before download.- Returns:
true
if theResultSet
is gzipped before download, elsefalse
-
getResultSetMetaDataPolicy
Gets theResultSetMetaDataPolicy
. Defines theResultSet
Metadata policy. Says if theResultSet
Metadata is to be downloaded along with theResultSet
.- Returns:
- the
ResultSet
Metadata policy
-
getRequestProperties
Gets all the request properties that are set to the underlyingHttpURLConnection
for each http call.- Returns:
- the request properties that are set to the underlying
HttpURLConnection
for each http call.
-
getClobReadCharset
Gets the charset name to use when reading a CLOB content with theResultSet#getString()
methods. Defaults tonull
.- Returns:
- the charset name to use when reading a CLOB content with the
ResultSet#getString()
methods. Defaults tonull
.
-
getClobWriteCharset
Gets the charset name to use when writing a CLOB content withPreparedStatement
streaming methods.- Returns:
- the charset name to use when writing a CLOB content with
PreparedStatement
streaming methods.
-
getCreationDateTime
Gets the creation date and time of the Connection.- Returns:
- the creation date and time of the Connection.
-
getMaxRetries
public int getMaxRetries()Gets the maximum number of retries for failed requests.- Returns:
- the maximum number of retries for failed requests.
-
getRetryIntervalMs
public int getRetryIntervalMs()Gets the interval between retries in milliseconds.- Returns:
- the interval between retries in milliseconds.
-
toString
-