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 PasswordAuthenticationgetAuthentication()Gets the main authentication info against the AceQL serverStringgetClobReadCharset()Gets the charset name to use when reading a CLOB content with theResultSet#getString()methods.StringgetClobWriteCharset()Gets the charset name to use when writing a CLOB content withPreparedStatementstreaming methods.intgetConnectTimeout()Gets the specified timeout value, in milliseconds, to be used when opening a communications link to the remote server.InstantgetCreationDateTime()Gets the creation date and time of the Connection.StringgetDatabase()Gets the remote database nameintgetMaxRetries()Gets the maximum number of retries for failed requests.ProxygetProxy()Gets theProxyin use.PasswordAuthenticationgetProxyAuthentication()Gets theProxyusername and password.intgetReadTimeout()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 underlyingHttpURLConnectionfor each http call.ResultSetMetaDataPolicygetResultSetMetaDataPolicy()Gets theResultSetMetaDataPolicy.intgetRetryIntervalMs()Gets the interval between retries in milliseconds.StringgetUrl()Gets the URL of the remote databasebooleanisGzipResult()Gets a boolean that say if theResultSetis gzipped before download.booleanisPasswordSessionId()Says if the password is an AceQL Session ID.StringtoString()
-
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:
trueif the password is an AceQL Session ID, elsefalse
-
getProxy
Gets theProxyin use. Returns null if noProxyis in use.- Returns:
- the
Proxyin use.
-
getProxyAuthentication
Gets theProxyusername and password. Returns null if noProxyis in use.- Returns:
- the
Proxyusername 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 theResultSetis gzipped before download.- Returns:
trueif theResultSetis gzipped before download, elsefalse
-
getResultSetMetaDataPolicy
Gets theResultSetMetaDataPolicy. Defines theResultSetMetadata policy. Says if theResultSetMetadata is to be downloaded along with theResultSet.- Returns:
- the
ResultSetMetadata policy
-
getRequestProperties
Gets all the request properties that are set to the underlyingHttpURLConnectionfor each http call.- Returns:
- the request properties that are set to the underlying
HttpURLConnectionfor 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 withPreparedStatementstreaming methods.- Returns:
- the charset name to use when writing a CLOB content with
PreparedStatementstreaming 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
-